Skip to content

Tab change resets search or filter #17

Open
@pmaas

Description

@pmaas

When you use the search (or filter) inside default tree tab panel and then change to another tab and go back to the tree panel, the tree is still filtered, but the search box is empty:

search-change-tab

Activity

dimaip

dimaip commented on Mar 9, 2019

@dimaip
Member

Hey, thanks for reporting!
It's actually not a bug with FlatNav, but rather a missing feature in Neos core:
Currently Tabs component just destroys the contents of invisible tabs (for performance reasons). In order to preserve their state one would have to keep their state outside of Tabs, e.g. in redux.
Alternatively we could create a variant of Tabs component that would just hide other tabs and not destroy them, but I'm not sure I'd be happy to use it here for performance reasons.

So if you are really keen on fixing it you'd need to move the search state to redux in Neos.
Personally I don't see it as a big issue though.

pmaas

pmaas commented on Mar 9, 2019

@pmaas
ContributorAuthor

Hey @dimaip, thanks for the explanation. For me it's also not a big problem. I stumbled over it because the x to reset the filter is also gone. This leads to the situation that you have a filtered tree without the possibility to reset it (now you have to use the search again to be able to reset the tree). Maybe it's easier to reset the filter of the tree instead of keeping the search state outside of the tabs?

dimaip

dimaip commented on Mar 17, 2019

@dimaip
Member

Maybe it's easier to reset the filter of the tree instead of keeping the search state outside of the tabs?

Maybe just fix the filter reset button?

pmaas

pmaas commented on Mar 17, 2019

@pmaas
ContributorAuthor

Maybe just fix the filter reset button?

Yes, but perhaps a bit irritating to reset a filter witch is no longer shown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @dimaip@pmaas

      Issue actions

        Tab change resets search or filter · Issue #17 · psmb/Psmb.FlatNav