-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using index mappers instead of own created storage for states of filtering #7319
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit f4cc152:
|
…g newly introduced functions #6830
Additionally, the commit updates the TS definition. Issue: #6830
The commit fixes a bug which occurs in column filtering state indication within the columns' headers. The ConditionCollection class while closing the dropdown menu unregistered the "filteringStates" map, where shouldn't.
The commit removes the stateSaver mixin (which wasn't used broadly) and directly implements the IndexMapper architecture into the Filters UI components. Moreover, the changes remove the "hiddenRowsCache" map which, as it turned out, is not necessary at all. The UI components' hidden state can be calculated on the fly while showing the Dropdown menu. Issue: #6830
Issue: #6830
The code unnecessary call hide/show methods where while components' state restoration the visibility state is already set. Issue: #6830
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@budnix took over this PR, should no longer be a reviewer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇
Context
PR #7276 introduced a new kind of Index Map. I'm using it here for purpose of storing and managing states of filtering for particular columns. The
Filters
plugin has been adjusted to use the only Index Map (all unnecessary parts of code has been removed). What's more:clearConditions
method ofConditionCollection
element. There was a function that cleared conditions at the specified column index but without clearing stack order (stored in separate array). Since the order of columns is stored inside the Index Mapper there is no way to threaten it separately. Thus, some parts of the code have been changed. HooksbeforeClear
andafterClear
have been removed whileafterRemove
hook has been introduced.isMatchInConditions
method ofConditionCollection
element. It will need an argument. Function without an argument hasn't been used internally.clearValue
- for newly created Index Map within Using index mappers instead of own created storage for states of sorting #7276.menu.
stateSaver
mixing which causes the components state misalignment after column reordering. The mixin is removed and the state management from now on is implemented directly into the UI Base component.How has this been tested?
Manual tests for alter actions.
Types of changes
Related issue(s):
Checklist: