You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think when select is rendered it should not fire onChange action if the value property is equal to null or undefined. BTW, if value property is equal to anything else, than null or undefined the onChange action does not fire.
For example, I have a list of insurance types:
<XSelect @value={{this.insuranceTypeId}} @onChange={{action "showInsuranceTypePopup"}} as |xs|>
<xs.option>None</xs.option>
<xs.option @value=1>Medicare</xs.option>
<xs.option @value=2>Medicaid</xs.option>
<xs.option @value=3>Tricare Champus</xs.option>
<xs.option @value=4>Champva</xs.option>
<xs.option @value=5>Group Health Plan</xs.option>
<xs.option @value=6>FECA Black Lung</xs.option>
<xs.option @value=7>Other</xs.option>
</XSelect>
The initial value of 'this.insuranceTypeId' is equal to null, because no of the license is chosen and this is normal. But the addon fires onChange action. I do not get it why? Nothing changed. In my case it brings an issue, because implementation of showInsuranceTypePopup action shows a popup, so my users, when page has been loaded, have to close the popup first, then do what they want. In every such case, I have to workaround this issue.
In emberx-select version 3.x it did not fire the event, now it does.
What do you think?
The text was updated successfully, but these errors were encountered:
enterpub
changed the title
When select is rendered it should not fire onChange action if the value property is equal to null or undefined
When select is rendered it should not fire onChange action if value property is equal to null or undefinedJun 26, 2019
Version of x-select: 4.0.0-beta.2
Ember Version: 3.10.2
Ember CLI Version: 3.10.1
I think when select is rendered it should not fire
onChange
action if thevalue
property is equal tonull
orundefined
. BTW, ifvalue
property is equal to anything else, thannull
orundefined
theonChange
action does not fire.For example, I have a list of insurance types:
The initial value of 'this.insuranceTypeId' is equal to
null
, because no of the license is chosen and this is normal. But the addon firesonChange
action. I do not get it why? Nothing changed. In my case it brings an issue, because implementation ofshowInsuranceTypePopup
action shows a popup, so my users, when page has been loaded, have to close the popup first, then do what they want. In every such case, I have to workaround this issue.In emberx-select version 3.x it did not fire the event, now it does.
What do you think?
The text was updated successfully, but these errors were encountered: