reactjs-docs/ReactJS/Kanban/Workflows.md

1.8 KiB

layout title description documentation platform keywords
post Workflows Workflows ug React JS Workflows,kanban Workflows

Workflows

Workflows can be defined to set the flow of card moving between the Kanban column statuses and it is applicable to drag and drop and context menu features.

You can set workflows as array of Objects which consists of key and allowedTransitions properties. The allowedTransitions accepts more than one transition of the specific column key mentioned in key property.

If a card is to be dragged to not allowed transition columns , then not supported warning symbol will be displayed for denoting the error.

The following code example describes the above Workflow functionality.

{% highlight html %}

var data = ej.DataManager(window.kanbanData).executeLocal(ej.Query().take(20)); var workflow =[
{ key:"Open",allowedTransitions:"InProgress"}, { key:"InProgress",allowedTransitions:"Testing,Close"} ]; ReactDOM.render( <EJ.Kanban dataSource={data} keyField="Status" fields-content="Summary" fields-primaryKey="Id" workflows={workflow} fields-imageUrl="ImgUrl" allowTitle={true}> </EJ.Kanban>, document.getElementById('kanbanboard-default') ); {% endhighlight %}

The following output is displayed as a result of the above code example.