Skip to content

Conversation

@nelara
Copy link

@nelara nelara commented Sep 30, 2022

Problem
Selecting option from the options list. Clicking "Select All" (cmd + A) in the field and clicking any letter on the keyboard. Selection is cleared, but the first letter is not captured in the text field.

Solution
Capturing TextChanged event with entered text even if current selection exists. If developer does not clear the "selected" by themselves the label of "selected" is anyway shown.

Problem
Selecting option from the options list. Clicking "Select All" (cmd + A) in the field and clicking any letter on the keyboard. Selection is cleared, but the first letter is not captured in the text field.

Solution
Capturing TextChanged event with entered text even if current selection exists. If developer does not clear the "selected" by themselves the label of "selected" is anyway shown.
@russelldavies
Copy link
Owner

Thanks for the PR. I see what you mean but if you select something then backspace the input text is now the full text of the selected item so you may need to delete lots of text. Another option could be:

...
{ onChange =
    if config.selected == Nothing then
        config.onChange << TextChanged

    else
        config.onChange << always (TextChanged "")
...

I'm not sure this is better though.

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

Successfully merging this pull request may close these issues.

2 participants