Skip to content

Commit

Permalink
Fix TomSelect clearOptions method
Browse files Browse the repository at this point in the history
  • Loading branch information
rjaros committed Dec 1, 2024
1 parent 7daa345 commit 7a42825
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,10 @@ open class TomSelectInput(
* Removes all unselected options from the control.
*/
open fun clearOptions() {
tomSelectJs?.clearOptions()
if (tomSelectJs != null) {
tomSelectJs!!.clearOptions()
tomSelectJs.asDynamic().input.clear()
}
}

override fun getState(): String? = value
Expand Down

0 comments on commit 7a42825

Please sign in to comment.