-
Notifications
You must be signed in to change notification settings - Fork 11
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(ShemaViewer): show loader correctly #2019
Conversation
const viewSchemaRequestParams = isViewType(type) ? {path, database: tenantName} : skipToken; | ||
|
||
const {data: viewColumnsData, isLoading: isViewSchemaLoading} = | ||
const {currentData: viewColumnsData, isLoading: isViewSchemaLoading} = |
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.
actually we can still use data - as it will update as soon as data fetched
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.
It is not properly updated when you change objects in schema tree. So you have a chance to see data of a previous object until current object data is loaded
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 can try it here - change schema object from my_view3
to my_view2
with slowed internet
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.
I mean we have
if (loading || isViewSchemaLoading) {
return <TableSkeleton />;
}
I would expect that until data is fully loaded/fetched we would see skeleton?
const loading = | ||
(isViewSchemaFetching && viewColumnsData === undefined) || | ||
(isTableSchemaFetching && tableSchemaData === undefined); |
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.
isLoading
isn't set to true
when path
changes, so we don't see loader on schema object change
Closes #1288
CI Results
Test Status: ✅ PASSED
📊 Full Report
Test Changes Summary ⏭️1
⏭️ Skipped Tests (1)
Bundle Size: ✅
Current: 83.22 MB | Main: 83.22 MB
Diff: +0.25 KB (0.00%)
✅ Bundle size unchanged.
ℹ️ CI Information