framework7io / framework7

Full featured HTML framework for building iOS & Android apps
http://framework7.io
MIT License
18.13k stars 3.23k forks source link

SmartSelect unset values #3294

Closed isaacbatst closed 5 years ago

isaacbatst commented 5 years ago

Is your feature request related to a problem? Please describe. It's not really a problem, its just a shortcut for when we want to completely unset the values of the smartselect.

Describe the solution you'd like

A function that unset the smartselect value. Cleaning the item-after displayed values, and unselecting the smartselect inputs.

Describe alternatives you've considered

I dont know if it would work always but, i think something like this:

Clear the select boxes

for(let i = 0; i < smartSelect.$selectEl[0].length; i++) { smartSelect.$selectEl[0][i].selected = false; }

clear the displayed values

smartSelect.setValue([]);

in a native smartSelect.unsetValues() would be awesome.

Found at: http://forum.framework7.io/t/solved-how-to-uncheck-the-selected-values-of-smart-select/5946/2

nolimits4web commented 5 years ago

Added to upcoming v5