-
Notifications
You must be signed in to change notification settings - Fork 31
Adding goToPage(0) to Filters from within the Table and the Stats Bar #1266
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: main
Are you sure you want to change the base?
Conversation
Use Run test server using develop.opencast.org as backend:
Specify a different backend like stable.opencast.org:
It may take a few seconds for the interface to spin up. |
This pull request is deployed at test.admin-interface.opencast.org/1266/2025-05-14_08-32-25/ . |
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.
Please fix the indentation issues. Otherwise the code is fine and it works as described.
dispatch(goToPage(0)); | ||
await dispatch(editFilterValue({filterName: filter.name, value: presenter})); |
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.
Fix the indentation:
dispatch(goToPage(0)); | |
await dispatch(editFilterValue({filterName: filter.name, value: presenter})); | |
dispatch(goToPage(0)); | |
await dispatch(editFilterValue({filterName: filter.name, value: presenter})); |
dispatch(goToPage(0)); | ||
await dispatch(editFilterValue({filterName: filter.name, value: seriesId})); |
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.
Fix indentation:
dispatch(goToPage(0)); | |
await dispatch(editFilterValue({filterName: filter.name, value: seriesId})); | |
dispatch(goToPage(0)); | |
await dispatch(editFilterValue({filterName: filter.name, value: seriesId})); |
dispatch(goToPage(0)); | ||
await dispatch(editFilterValue({filterName: filter.name, value: date + "/" + date})); |
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.
Fix indentation:
dispatch(goToPage(0)); | |
await dispatch(editFilterValue({filterName: filter.name, value: date + "/" + date})); | |
dispatch(goToPage(0)); | |
await dispatch(editFilterValue({filterName: filter.name, value: date + "/" + date})); |
dispatch(goToPage(0)); | ||
dispatch(editFilterValue({filterName: filter.name, value: filterValue})); |
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.
Fix indentation:
dispatch(goToPage(0)); | |
dispatch(editFilterValue({filterName: filter.name, value: filterValue})); | |
dispatch(goToPage(0)); | |
dispatch(editFilterValue({filterName: filter.name, value: filterValue})); |
Impressive review speed luniki :o |
Sooo I tested
and it works like expected. :) I only have one issue. When I choose a filter, a small temporary table shows up first, and then the filtered table is shown. I know the ETH had the same issue and @Arnei fixed it? 🤔 |
Maybe related to #1231. |
Please note that I have fixed this in other PR introducing a more comprehensive solution, namely with debounce & co. |
As described in Issue #1089 when filtering the Event Table via the
addFilter
functionality of the links within the table or the stats bar the offset was not reset, leading to an empty table. This filter functionality is available for:This PR fixes the bug by making sure that before fetching the Events with the Filter the UI returns to the first page of the table and thereby resetting the offset to 0. The same behavior was already implemented for filtering the table via the Filter Bar.
How to test: