Skip to content

[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

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

samuelreichert
Copy link
Contributor

@samuelreichert samuelreichert commented Jul 11, 2025

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.

@samuelreichert samuelreichert marked this pull request as ready for review July 14, 2025 13:54
@samuelreichert samuelreichert requested a review from a team as a code owner July 14, 2025 13:54
@samuelreichert samuelreichert force-pushed the feat/WC-2838-dg2-refresh-indicator branch 3 times, most recently from 28b8013 to 7801661 Compare July 16, 2025 13:40
@samuelreichert samuelreichert force-pushed the feat/WC-2838-dg2-refresh-indicator branch 3 times, most recently from 3adb85c to fa456e1 Compare July 22, 2025 14:36
@samuelreichert samuelreichert force-pushed the feat/WC-2838-dg2-refresh-indicator branch 2 times, most recently from 6b07406 to 1b42ea2 Compare July 30, 2025 07:51
@samuelreichert samuelreichert force-pushed the feat/WC-2838-dg2-refresh-indicator branch from 59f9ebf to bcee8d3 Compare July 31, 2025 14:17
@@ -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;
Copy link
Collaborator

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();
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants