Skip to content

Add Progress Spinner when hitting the Next button on the Match Columns Step #248

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
danielletully opened this issue Jan 30, 2024 · 3 comments
Labels
v5 Will be solved in v5

Comments

@danielletully
Copy link

Just wondering if there is an easy way to add a Progress Spinner when hitting the Next button on the Match Columns Step? My files are taking about 30 seconds to process. Thanks.

@benzler
Copy link

benzler commented Feb 5, 2024

@danielletully I have the same issue. Are you running a custom data hook?

@benzler
Copy link

benzler commented Feb 6, 2024

@danielletully I have the same issue. Are you running a custom data hook?

I noticed that the loading indicator of the "next" button wasn't triggered when the function wasn't called asynchronously.

Here's how I managed to resolve it:

selectHeaderStepHook={async (
    headerValues: RawData,
    Data: RawData[],
  ) => {
    const d = await new Promise<{
      headerValues: RawData;
      Data: RawData[];
    }>((resolve) => {
      setTimeout(() => {
        const result = doCustomDataMapping(
          headerValues,
          data,
          params,
          fields,
        );
        resolve(result);
      }, 0);
    });
    return d;
  }}

By making the selectHeaderStepHook function asynchronous (async), and awaiting the promise creation using await, it ensures that the loading indicator functions as expected even with the slight delay introduced by setTimeout.

@danielletully
Copy link
Author

@benzler Thank you so much!!! This worked for me!

@masiulis masiulis added the v5 Will be solved in v5 label Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v5 Will be solved in v5
Projects
None yet
Development

No branches or pull requests

3 participants