-
Notifications
You must be signed in to change notification settings - Fork 30
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
Bug 2317212: Fix Clients' list page filtering #1648
base: master
Are you sure you want to change the base?
Bug 2317212: Fix Clients' list page filtering #1648
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: SanjalKatiyar The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@SanjalKatiyar: This pull request references Bugzilla bug 2317212, which is valid. No validations were run on this bugRequesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@openshift-ci[bot]: GitHub didn't allow me to request PR reviews from the following users: PrasadDesala. Note that only red-hat-storage members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@@ -75,3 +76,15 @@ export const versionMismatchFilter = ( | |||
); | |||
}, | |||
}); | |||
|
|||
export const nameFilterOverride = (): RowFilter<StorageConsumerKind> => ({ |
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.
export const nameFilterOverride = (): RowFilter<StorageConsumerKind> => ({ | |
export const storageConsumerNameFilter = (): RowFilter<StorageConsumerKind> => ({ |
// - passing to both "useListPageFilter" hook & "ListPageFilter" component | ||
// "rowFiltersWithNameOverride": | ||
// - needed for overriding the filtering (default) on the CR's "name" (need to read the name from the CR's status instead) | ||
// - only passing to "useListPageFilter" hook & not "ListPageFilter" component |
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.
Why not list page filter component?
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.
We have a separate dropdown for "Name" filtering on the UI, already managed by ListPageFilter
component by default. All we need to do is to override filter's definition in useListPageFilter
hook.
ListPageFilter + rowFilters
adds a different/new dropdown, passing rowFiltersWithNameOverride
to ListPageFilter
is adding extra empty item to that dropdown.
b238dae
to
1ca1ecf
Compare
Before:
After: