Filtering

27 Feb 2017 / 1 minute to read

Filtering allows to filter the collection of cards from dataSource which meets the predefined query in the quick filters collection. To enable filtering, define filterSettings collection with display text and ej.Query.

You can also define display tip to describe filter definition to user using property description. If the description property is not defined, given text will act as display tip.

We can also customize filter option through external button or customToolbarItems by using filterCards() method.

The following code example describes the above behavior.

  • html
  • var data = ej.DataManager(window.kanbanData).executeLocal(ej.Query().take(20));
    var filter = [                             
            { text: "Janet Issues", query: new ej.Query().where("Assignee", "equal", "Janet Leverling"), description: "Displays issues which matches the assignee as 'Janet Leverling'" },
            { text: "Andrew Issues", query: new ej.Query().where("Assignee", "equal", "Andrew Fuller"), description: "Displays issues which matches the assignee as 'Andrew Fuller'" }
        ];
    ReactDOM.render(
    <EJ.Kanban dataSource={data} keyField="Status" fields-content="Summary" fields-primaryKey="Id" fields-tag="Tags" filterSettings={filter}>
        <columns>
    		<column headerText="Backlog" key="Open"></column>
    		<column headerText="In Progress" key="InProgress"></column>
    	    <column headerText="Done" key="Close"></column>
    	</columns>
    </EJ.Kanban>,
       document.getElementById('kanbanboard-default')
    );

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