-
Notifications
You must be signed in to change notification settings - Fork 99
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
feat(Table): add filter to colum settings #1627
Conversation
Preview is ready. |
Playwright Test Component is ready. |
@@ -242,6 +246,17 @@ const mapItemDataToProps = (item: TableColumnSetupItem): ListItemCommonProps => | |||
}; | |||
}; | |||
|
|||
const defaultFilterItemsFn = (item: TableColumnSetupItem, value: string) => { | |||
return typeof item.title === 'string' | |||
? item.title.toLowerCase().includes(value.toLowerCase()) |
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.
I would also trim 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.
@@ -242,6 +246,17 @@ const mapItemDataToProps = (item: TableColumnSetupItem): ListItemCommonProps => | |||
}; | |||
}; | |||
|
|||
const defaultFilterItemsFn = (item: TableColumnSetupItem, value: string) => { |
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.
may be it's passible to use useListFilter
from this example and not realise filtration logic from stretch?
it is also welcome for the development of a hook component for filtering
@polikashina @amje @Raubzeug What do you think?
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.
Looks perfect!
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.
Visual Tests Report is ready. |
src/components/Table/hoc/withTableSettings/TableColumnSetup/TableColumnSetup.tsx
Show resolved
Hide resolved
Can we remove the delay? 2024-06-08.22.53.39.mov |
There is a delay because of debounce. It is possible to set it to |
Let's set to 0. There is no reason to wait user finishes input |
e839ec9
to
6e70da7
Compare
Added search for column settings for withTableSettings HOC
https://st.yandex-team.ru/UXRFC-485