-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
fix(tags): Update loading + pagination for Tags Page #25473
Conversation
@hughhhh would you mind filling out the PR description. |
const showListViewObjs = | ||
objects.dashboard.length > 0 || | ||
objects.chart.length > 0 || | ||
objects.query.length > 0; | ||
|
||
useEffect(() => { | ||
console.log(search); |
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.
console.log(search); |
// addDangerToast('Error Fetching Tagged Objects'); | ||
// logging.log(error.text); | ||
// }, | ||
// ); |
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.
was this intentional?
@@ -30,6 +30,7 @@ import { EmptyStateBig } from 'src/components/EmptyState'; | |||
import { fetchObjects } from '../tags/tags'; | |||
|
|||
const MAX_TAGS_TO_SHOW = 3; | |||
const PAGE_SIZE = 5; |
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.
Should this be 50, like before?
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.
design wants this to be 10 since there are 3 tables on the 1 page
ab91cbc
to
a1fca2a
Compare
fetchSingleTag( | ||
tagId, | ||
(tag: Tag) => { | ||
setTag(tag); | ||
setLoading(false); | ||
}, | ||
(error: Response) => { | ||
addDangerToast(t('Error Fetching Tagged Objects')); |
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.
same as above
setLoading(false); | ||
}, | ||
(error: Response) => { | ||
addDangerToast('Error Fetching Tagged Objects'); |
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.
you might need to add setLoading(false);
here to prevent the spinner kept spinning
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.
LGTM
SUMMARY
Added pagination to Tags.AllEntities page and fixed loading to stop flickering on component mounting
BEFORE/AFTER
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION