Data table select filter options get reset after choosing any option

Data table select filter options get reset after choosing an option. I am using server-side data loading.

Tagged:

Comments

  • 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:
    1. sync updates data in related components
    2. 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 in data, we are dealing with synchronization. From the inside, this type of sync works exactly the same as the explicit sync 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: https://snippet.webix.com/588f6799

  • Hi @AlenaLisava

    Here is a snippet that replicates the issue: https://snippet.webix.com/yg2tpsqr
    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 : https://snippet.webix.com/kkc4d0q8

  • 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: https://snippet.webix.com/v01zuxep

  • Thanks @AlenaLisava

    that workaround works perfectly

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!