Merge branch 'release/16.3'

This commit is contained in:
Laura Neto
2025-10-02 12:22:29 +02:00
2 changed files with 6 additions and 0 deletions

View File

@@ -133,6 +133,7 @@ export class UmbPickerInputContext<
#removeItem(unique: string) {
const newSelection = this.getSelection().filter((value) => value !== unique);
this.setSelection(newSelection);
this.#itemManager.removeStatus(unique);
this.getHostElement().dispatchEvent(new UmbChangeEvent());
}
}

View File

@@ -124,6 +124,11 @@ export class UmbRepositoryItemsManager<ItemType extends { unique: string }> exte
return this.#items.asObservablePart((items) => items.find((item) => this.#getUnique(item) === unique));
}
removeStatus(unique: string) {
const newStatuses = this.#statuses.getValue().filter((status) => status.unique !== unique);
this.#statuses.setValue(newStatuses);
}
async getItemByUnique(unique: string) {
// TODO: Make an observeOnce feature, to avoid this amount of code: [NL]
const ctrl = this.observe(this.itemByUnique(unique), () => {}, null);