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

on:change is not triggered with option showAllResultsOnFocus #80

Open
Artofaj opened this issue Oct 23, 2023 · 1 comment
Open

on:change is not triggered with option showAllResultsOnFocus #80

Artofaj opened this issue Oct 23, 2023 · 1 comment

Comments

@Artofaj
Copy link

Artofaj commented Oct 23, 2023

The component works as expected when used like this:

              <Typeahead
                label="Country"
                hideLabel
                limit={10}
                placeholder="Search Country"
                extract={(item) => item.NAME_0}
                data={regions0}
                bind:value={countrySelected}
                on:change={() => {
                console.log('expect an output')}
              >

With this I get the output expect an output

However, if I add the showAllResultsOnFocus like this:

              <Typeahead
                label="Country"
                hideLabel
                limit={10}
                placeholder="Search Country"
                extract={(item) => item.NAME_0}
                data={regions0}
                bind:value={countrySelected}
                on:change={() => {
                console.log('expect an output')}
               showAllResultsOnFocus
              >

I just get the expected output every other time.

@Artofaj
Copy link
Author

Artofaj commented Oct 24, 2023

Aparently 'every other time' is after clicking the delete button. Only then, the next input triggers the on:change.

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

1 participant