Closed amayr666 closed 7 years ago
I tried your code locally and it actually won't work (as is) because there's also some code to change in the View of the customElement. Specifically, I have a parseBool()
on the multiple.bind
, and for your change to work, we have to assume that the result of the parseBool is True on empty. So I updated the code to be multiple.bind="util.parseBoolOrTrueOnEmpty(multiple) & optional"
and added this new util.parseBoolOrTrueOnEmpty()
function and it works.
I basically wanted to cover the following 4 cases:
1- only multiple <select multiple />
2- with multiple true <select multiple="true" />
3- with multiple false <select multiple="false" />
4- incorrect attribute will default to False <select multiple="foo" />
So I will merge your code and add my changes as well to make it all work. Expect a new version coming soon.
Great Job, thanks! Now it's supporting html5 standard when it comes to the multiple
flag. We're really looking forward to this change ;)
fixed #22, should not change any behavior of current implementations with multiple=false