Promact / md2

Angular2 based Material Design components, directives and services are Accordion, Autocomplete, Collapse, Colorpicker, Datepicker, Dialog(Modal), Menu, Multiselect, Select, Tabs, Tags(Chips), Toast and Tooltip.
http://code.promactinfo.com/md2/
MIT License
379 stars 111 forks source link

Select component doesnt accept 0 and false values(ngModel) in md2-option #275

Closed rushi216 closed 6 years ago

rushi216 commented 7 years ago

https://github.com/Promact/md2/blob/4f4047751d980ce6a74acbf32cab1476a465afa7/src/lib/select/select.ts#L578

Because of above line it is not selecting option whose value is 0 or false. We might need to update option.value && this.equals(option.value, value) to option.value != null && option.value != undefined && this.equals(option.value, value)

ali-kamalizade commented 7 years ago

I can confirm that 0 doesn't work. This one gave me headaches as I've thought I was doing something wrong.

krupa310 commented 6 years ago

updated in latest version