You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
## [Unreleased]
2
2
3
3
### Added
4
-
* DaisyUI 5 compatibility - active options now include both `active` and `menu-active` classes for compatibility with DaisyUI 3, 4, and 5.
5
-
* Add `keep_options_on_select`toggle
4
+
* DaisyUI 5 compatibility - active options now include both `active` and `menu-active` classes for compatibility with DaisyUI 3, 4, and 5
5
+
* Add `keep_options_on_select`flag. By default, when not in `quick_tags` mode, input text field and list of selectable options are now cleared after selection. This flag suppresses this behavior
Copy file name to clipboardExpand all lines: lib/live_select.ex
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -18,8 +18,8 @@ defmodule LiveSelect do
18
18
clicking an option with the mouse.
19
19
20
20
Whenever an option is selected, `LiveSelect` will trigger a standard `phx-change` event in the form. See the "Examples" section
21
-
below for details on how to handle the event. In `single` and `tags` mode, the input text and the list of selectable options is cleared after selection.
22
-
To preserve both, use the `keep_options_on_select` flag in the assigns.
21
+
below for details on how to handle the event. In `single` and `tags` mode, the content of the input text field and the list of selectable options are cleared on selection.
22
+
To suppress this behavior, use the `keep_options_on_select` flag in the assigns.
23
23
24
24
In single mode, if the configuration option `allow_clear` is set, the user can manually clear the selection by clicking on the `x` button on the input field.
25
25
In tags mode, single tags can be removed by clicking on them.
@@ -416,7 +416,7 @@ defmodule LiveSelect do
416
416
417
417
attr:keep_options_on_select,:boolean,
418
418
doc:
419
-
~s(if `true`, when in single or tags mode, the current set of options and the input text is preserved upon selection)
419
+
~s(if `true`, the current list of selectable options and the content of the input text field are preserved upon selection)
420
420
421
421
attr:value,:any,doc: "used to manually set a selection - overrides any values from the form.
422
422
Must be a single element in `:single` mode, or a list of elements in `:tags` mode."
0 commit comments