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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃[闂] Suppress onFinish Trigger on Value Change in LightFilter #8377

Open
yuki2006 opened this issue May 2, 2024 · 1 comment

Comments

@yuki2006
Copy link

yuki2006 commented May 2, 2024

馃 闂鎻忚堪

In the LightFilter component, the onFinish method is being triggered every time a value changes. I am looking for a way to suppress this behavior as we might be adding a separate submit button.

馃捇 绀轰緥浠g爜

This issue can be reproduced in the following demo:
Lightweight Filtering Demo

馃殤 鍏朵粬淇℃伅

It appears that the submit action is directly invoked in the code here:
LightFilter index.tsx - Line 304

@wtcodeai
Copy link

wtcodeai commented May 2, 2024

Think that's the point of Light Filter - any changes will be applied every time state changed.
You can easily override this behavior by writing an external hook which uses two states for actual and applied state and can handle submit (or implementing directly in your component)

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