Adding goToPage(0) to Filters from within the Table and the Stats Bar#1266
Adding goToPage(0) to Filters from within the Table and the Stats Bar#1266ciegler wants to merge 2 commits intoopencast:developfrom
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-20_08-18-17/ . |
luniki
left a comment
There was a problem hiding this comment.
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.
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.
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.
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})); |
src/components/shared/Stats.tsx
Outdated
| dispatch(goToPage(0)); | ||
| dispatch(editFilterValue({filterName: filter.name, value: filterValue})); |
There was a problem hiding this comment.
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. |
|
Sorry for the delay, I now fixed the wrong indentations. |
|
That would then leave the issue with the "small temporary table" Piriya mentioned. Not sure if want to consider this a blocker. |
|
This pull request has conflicts ☹ |
As described in Issue #1089 when filtering the Event Table via the
addFilterfunctionality 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: