Search option pivot table is possible ?

Hi,
Like in below snippet for datatable, search by text option is available in pivot table ?

https://snippet.webix.com/64dbe423

Thanks

Hi,

A filter with type:"text" is available for any data field:

https://snippet.webix.com/8pm4x569

Hi @Listopad,

Yes, But we are looking for a filter box to present below the title for every column will that be possible as shown below ?

https://snippet.webix.com/64dbe423

Thanks

The structure of the entire grid is dynamic and depends on the structure, including the grid header.

The hierarchy should not be affected, so the only option is to add a filter to the existing header cells:

https://snippet.webix.com/r181cojr

But it will erase the label of the column and disable sorting by header click on these columns.
In order to restore the original label, it is possible to add a custom header content which will handle both original label and the filter:

https://snippet.webix.com/qdd0k3cg

@Listopad , Many thanks… i will try out this option :slight_smile:

Hi @Listopad ,
I tired the above snippet but for custom operation string the search is not working
In the below snippet u can check the continent column it is not working as expected
https://snippet.webix.com/pwd2g58u

Thanks

Hi @Listopad ,
Can the above scenario possible for string search?

Thanks

The filtering is actually working, but it filters data not by visible text, but by raw values. And group rows already have all possible values of sub rows (because of array.join )

Not quite sure about your use-case, but alternative string operation can be used with filtering.

https://snippet.webix.com/r0dr11ov

@maksim Many thanks for your response. I tired the above scenario it works . But when i tired the same string filtering with number it is not working as expected.Below snippet is the sample for it.
https://snippet.webix.com/g425ic91

So in the above snippet if you filter the oil by “11” it will display other numbers like “7”,“4” too
Am facing the above issue.It wont give the exact match of numbers?

One more update here - https://snippet.webix.com/bp36qvwl
Check lines 63,66 - they return not-empty string values now

@maksim … Thanks a lot that works fine now :slight_smile:

Hi @makism ,
https://snippet.webix.com/bp36qvwl
In the above snippet it is possible to have the search box to be pre populated with some values.
For eg: In continent column, can the search box be pre populated with “south america” so that it displays only south america while loading of the table itself.

Can the above scenario possible?

Thanks in advance

@maksim

Is the above scenario possible?
Thanks

Normally, a value of filter can be defined in the structure
https://docs.webix.com/pivot__filters.html#settinginitialfilteringvalue

webix.ui({
  id:"pivot",
  view:"pivot",
  structure: {
    filters:[{name: "name", type: "text", value:"Argentina"}],
    ...
  }
});

When a user changes the configuration dynamically, the default filtered value can be set through events. onBeforeApply for example
https://docs.webix.com/api__ui.pivot_onbeforeapply_event.html