-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(dashboards): Add wildcard operators to global filters #104070
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
base: master
Are you sure you want to change the base?
Conversation
DominikB2014
left a comment
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.
lgtm, but some implementation questions!
| items={operatorOptions.map(option => ({ | ||
| ...option, | ||
| key: option.value, | ||
| label: option.label, | ||
| textValue: option.textValue, | ||
| onClick: () => { | ||
| setStagedOperator(option.value); | ||
| }, |
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.
Related to the above, isn't the memoization of operatorOptions negated because on every rerender we'll be mapping it a new objects (which triggers children to re-render)
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.
Good point! I fixed the redundant memoization of operatorOptions and tried my best to group memos where possible. They're def effective but were not clean/optimal at first. Pls let me know what you think before I merge 🙏
DominikB2014
left a comment
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.
Nice update on the memoization
| if (!filterToken) { | ||
| return []; | ||
| } | ||
| const iniitalValue = globalFilter.value |
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.
| const iniitalValue = globalFilter.value | |
| const initialValue = globalFilter.value |
:D
Fixes DAIN-1104