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

Clear button on Select doesn't fire onChange event #1802

Closed
Lynx-Boreal opened this issue Jul 23, 2021 · 2 comments
Closed

Clear button on Select doesn't fire onChange event #1802

Lynx-Boreal opened this issue Jul 23, 2021 · 2 comments

Comments

@Lynx-Boreal
Copy link

Lynx-Boreal commented Jul 23, 2021

Hello

On a Select component with multiple option and data-clear-button enabled, if one or more values are selected, clicking on the Clear button doesn't fire the onChange event.

To Reproduce

<select data-role="select" multiple data-clear-button="true" data-on-change="console.log('on-change fired')">
   <option value="1">Option 1</option>
   <option value="2">Option 2</option>
   <option value="3">Option 3</option>
</select>
  1. Select one or more options : the console reports the onChange event at each new selection (this is an expected behavior)
  2. Clear the selection using the Clear button : the console does not report the onChange event

Expected behavior
Clicking on the Clear button should fire the onChange event, as the selection goes from one or several values to none.

Desktop:

  • OS: tested on Windows10 and Ubuntu 20.04.2
  • Browser : Chrome, Firefox
  • Metro Version : 4.3.2
@xscode-auto-reply
Copy link

Thanks for opening a new issue. The author has been notified and will review it as soon as possible.
For urgent issues and priority support, visit https://xscode.com/olton/Metro-UI-CSS or Patreon

@olton olton added this to the 4.5.0 milestone Jul 24, 2021
olton added a commit that referenced this issue Jul 24, 2021
…ge` when user click on the `clear` button, issue #1802
@olton
Copy link
Owner

olton commented Jul 24, 2021

Thanks, fixed

@olton olton closed this as completed Aug 1, 2021
olton added a commit that referenced this issue Oct 28, 2023
…ge` when user click on the `clear` button, issue #1802
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants