Skip to content

Commit e913034

Browse files
committed
do not set input text field if current_text is undefined
1 parent 9720214 commit e913034

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* Bugfix: [Getting undefined in search box when a tag is unselected](https://github.com/maxmarcon/live_select/issues/128)
2+
13
## 1.7.3 (2025-10-19)
24

35
* Bugfix: [label not found in nil](https://github.com/maxmarcon/live_select/issues/125)

assets/js/live_select.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export default {
9292
this.handleEvent("select", ({ id, selection, mode, current_text, input_event, parent_event }) => {
9393
if (this.el.id === id) {
9494
this.selection = selection
95-
if (current_text !== null) {
95+
if (current_text != null) {
9696
this.setInputValue(current_text)
9797
}
9898
if (input_event) {

priv/static/live_select.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)