generated from RedHatInsights/frontend-starter-app
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(RHINENG-3105): loading rows not showing on activity delete
Description of Problem There's a small bug in Tasks on the Activity table. When you're on any page other than 1 and you delete an activity, the table shows a No results empty state instead of loading rows. How reproducible Always Steps to Reproduce Go to Tasks Click Activity Tab Go to page 2+ Delete an activity via the kebab Actual Behavior Table shows a "No results" empty state. Expected Behavior Should show loading rows Additional info This happens because the table component receives an array of 5 loading row components. Then it tries to paginate that data, and the `page` is currently set to a page over page 1, so if you're looking at 10 per page and you're on page 2, the 5 items sent in get paginated out. This fix will skip pagination if the table is in a loading state.
- Loading branch information
1 parent
29c599b
commit 42dfa1a
Showing
3 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,7 @@ const useTableTools = ( | |
paginator, | ||
filter, | ||
sorter, | ||
isTableLoading, | ||
}); | ||
|
||
const toolbarProps = { | ||
|