-
Notifications
You must be signed in to change notification settings - Fork 52
[WC-2838]: Implement RefreshIndicator component on Datagrid 2 #1765
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
28b8013
to
7801661
Compare
3adb85c
to
fa456e1
Compare
6b07406
to
1b42ea2
Compare
packages/shared/widget-plugin-grid/src/__tests__/DatasourceController.spec.ts
Outdated
Show resolved
Hide resolved
packages/shared/widget-plugin-grid/src/__tests__/DatasourceController.spec.ts
Outdated
Show resolved
Hide resolved
packages/shared/widget-plugin-grid/src/__tests__/DatasourceController.spec.ts
Show resolved
Hide resolved
packages/shared/widget-plugin-grid/src/query/DatasourceController.ts
Outdated
Show resolved
Hide resolved
… from GridBody component
…e in Widget component
59f9ebf
to
bcee8d3
Compare
@@ -161,6 +167,8 @@ const Main = observer(<C extends GridColumn>(props: WidgetProps<C>): ReactElemen | |||
|
|||
const selectionEnabled = selectActionHelper.selectionType !== "None"; | |||
|
|||
const showRefreshIndicator = refreshIndicator && refreshInterval > 1 && props.isLoading && !props.isFirstLoad; |
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.
Can we move all this logic to LoaderController? We can make it to be a getter and then pass it as prop.
provider = new GateProvider({ datasource: list.loading() }); | ||
host.setup(); |
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 see you making call of setup
on line 41 , we can avoid it. Just make sure host.setup()
is last call in beforeEach function. Then all "setup" hooks will be called before each test automatically. Also you can leave a comment to keep it as last statement.
Pull request type
New feature (non-breaking change which adds functionality)
Description
Implement a new property to show a refresh indicator. With the refresh indicator any datasource change triggers the progress bar on top of the Datagrid2.