Data table select filter options get reset after choosing an option. I am using server-side data loading.
Same here when having a long comboSelect filter when selecting an item in the middle the combo jumps to top and I have to scroll down again . I think this should not scroll up and stays where it is
Hello, @mgraph2010
Speaking about resetting filtering, that is the default behavior of the component, it happens because:
-
sync
updates data in related components - the result of filtering through the API (
filter / filterByAll
) is not stored as the state of the table and may be out of date on updated data.
To solve that, you could set a custom property by which it would be possible to track the filtering status of the table and, if necessary, filter it again.
When a created datastore or collection is assigned to a component indata
, we are dealing with synchronization. From the inside, this type ofsync
works exactly the same as the explicitsync
described in the Documentation
As for your issue, could you, please, provide us with a snippet that replicates the issue?
We didn’t manage to reproduce it. Please, check the example here: Code Snippet
Hi @AlenaLisava
Here is a snippet that replicates the issue: Code Snippet
in “Released” filter, select an item in the middle when selected the serverMultiSelectFilter
refreshes and scrolls up
PS: it happens even when using static options : Code Snippet
Thanks @AlenaLisava
that workaround works perfectly
Hello, @mgraph2010
By default, serverMultiSelectFilter
reacts to the selection of each new option. That means, that each time it sends a request to the server to return filtered data. At the same time filter refreshes its list data. Each time it reloads options. That is the reason the list scrolls up.
As a workaround, you could catch the very moment a new portion of data is loaded to the datatable
and show the last chosen option in the list.
Please, check the snippet here: Code Snippet