automatically add item to basket on counter product search

This commit is contained in:
imperosol committed 2026-05-27 18:22:07 +02:00
1 parent 99d85e0361
commit 362b9eea06
3 files changed
+15 -17

No files matched your search

@@ -25,6 +25,9 @@ document.addEventListener("alpine:init", () => {
}
this.codeField = this.$refs.codeField;
this.codeField.widget.hook("after", "onOptionSelect", () => {
this.handleCode();
});
this.codeField.widget.focus();
// It's quite tricky to manually apply attributes to the management part
@@ -154,6 +157,7 @@ document.addEventListener("alpine:init", () => {
this.addToBasket(code, quantity);
}
this.codeField.widget.clear();
this.codeField.widget.setTextboxValue("");
this.codeField.widget.focus();
},
}));