Smart Select Documentation

Pardon my frustration. I don’t understand how there can be a whole page of documentation for the Smart Select but not ONE line about how to set or get the value from the Smart Select. The most important part of any selector is the VALUE!

https://framework7.io/docs/smart-select.html#different-display-value

Dom7('select[name="NAME HERE"] option:checked'); Note: Dom7 seems to be missing the “:selected” selector from CSS

Returns the list of elements selected. You can use each() after that, depending on what you want to do.

app.toggle.create has an on change that accepts this.checked. On change is documented. this.checked is not…that was a guess on my part. Should not app.smartSelect.create also then have an on change (close) that accepts this.val() or something similar. AND WOULD IT REALLY HURT TO DOCUMENT THIS HERE?

There is no specific docs about it because it operates with usual <select> element, so getting/setting value or listening for change event doesn’t required something additional. Work with it like with usual select

1 Like