Skip to content
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

[bug] Why setList exec once when mounted ? #277

Open
vaynevayne opened this issue Jun 2, 2023 · 1 comment
Open

[bug] Why setList exec once when mounted ? #277

vaynevayne opened this issue Jun 2, 2023 · 1 comment

Comments

@vaynevayne
Copy link

No description provided.

@aiboost
Copy link

aiboost commented Jun 27, 2024

I agree. It's sad that we need to use such inelegant workaround like:

private isSettingListOnMount = true;

....

      setList={(newList) => {
          if (this.isSettingListOnMount) {
              this.isSettingListOnMount = false;
              return;
          }
          this.props.onChange(newList);
      }}

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

No branches or pull requests

2 participants