Closed
Description
Getting a weird bug at this line.
It seems that the ===
comparison fails on this line.
valueArray[valueArray.length - 1] === newOption
I put debugger breakpoint and inspected the values. Please see the console output.
> valueArray[valueArray.length - 1] === newOption
false
> newOption === newValue
false
> newOption
{label: "Create "sd"", value: "sd", __isNew__: true}
> newValue
{label: "Create "sd"", value: "sd", __isNew__: true}
> valueArray
[{…}]0: {label: "Create "sd"", value: "sd", __isNew__: true}length: 1__proto__: Array(0)
> valueArray.length
1
It looks like the newOption
and newValue
have the same content by they fail when compared using ===
operator. As the result the onCreateOption
is not called.