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

Unexpected <i-select> behaviour when resetting its state #328

Open
konstista opened this issue Nov 1, 2022 · 4 comments
Open

Unexpected <i-select> behaviour when resetting its state #328

konstista opened this issue Nov 1, 2022 · 4 comments
Labels
bug Issues that represent a bug.

Comments

@konstista
Copy link

konstista commented Nov 1, 2022

  • What is the expected and current behavior?
    If there are several components on the page and the state is reset for all of them at the same time - all components expand at the same time.

  • Steps to reproduce

  • Please tell us about your environment:

    • Version: >=3.0.5
    • Browser: all
    • Language: all (verified with TS, JS, OptionsAPI, Composition API)
  • Other information
    It makes sense to reset state of the component but keep it closed or add a prop that manages the behaviour.
    Maybe I am missing something in the documentation, I mean how we can reset state without re-opening a dropdown?

@konstista konstista added the bug Issues that represent a bug. label Nov 1, 2022
@konstista
Copy link
Author

Can verify that the behaviour persists on Inkline 3.1.8.

@konstista
Copy link
Author

The behaviour is most likely related to inputValue watcher that does not take into account null.

@konstista
Copy link
Author

konstista commented Nov 1, 2022

To resolve this issue there is a temporary workaround, not a nice-looking solution but works:

  • Wrap state reset in async function
  • Disable select before resetting state
  • Call state reset and await async function to finish
  • Enable select after the state is reset.

@alexgrozav
Copy link
Member

Thank you for reporting this. 😰 I'll look into it.

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

No branches or pull requests

2 participants