diff --git a/core/static/webpack/ajax-select-index.ts b/core/static/webpack/ajax-select-index.ts index b03ae32f..dc2389b5 100644 --- a/core/static/webpack/ajax-select-index.ts +++ b/core/static/webpack/ajax-select-index.ts @@ -80,9 +80,14 @@ export class AjaxSelect extends InheritedComponent<"select"> { }, }); + // Allow removing selected items by clicking on them this.widget.on("item_select", (item: TomItem) => { this.widget.removeItem(item); }); + // Remove typed text once an item has been selected + this.widget.on("item_add", () => { + this.widget.setTextboxValue(""); + }); } }