<ComboBox>
fires select
event every time an object in items
is changed
#44
Labels
<ComboBox>
fires select
event every time an object in items
is changed
#44
Before you start...
What browsers are you seeing the problem on?
Other - list in description
Description
<ComboBox>
will fire itsselect
event if theitems
prop is updated in the way that replaces a previous object with a new one, as opposed to just mutating the old object.Consider the following code:
The
console.log
actually fires when you press the button!P.S. I tested it only in Opera, but I'm sure this bug is not browser-specific
Steps To Reproduce
No response
Expected behavior
This behavior is very counter-intuitive, because the
select
event should not fire with the samevalue
of item (nothing new has been selected). I'm guessing the code checksaboutToBeSelectedItem === previousItem
but what should matter here is only thevalue
of item! The wayitems
array should be filled (by users of the library) is questionable by itself: #25Also, I think that it would be easier if the
select
event fired only when the user selected an item. That would make more sense, because all the changes of thevalue
prop can be handled by thebind:
directiveRelevant Assets
No response
The text was updated successfully, but these errors were encountered: