Skip to content

Commit 3c3d56f

Browse files
committed
schedule publishing - apply filter to selection manager
1 parent c1d83e1 commit 3c3d56f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/packages/documents/documents/modals/schedule-modal/document-schedule-modal.element.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ export class UmbDocumentScheduleModalElement extends UmbModalBaseElement<
4141
this.#selectionManager.setMultiple(true);
4242
this.#selectionManager.setSelectable(true);
4343

44+
const pickableFilter = this.data?.pickableFilter;
45+
46+
if (pickableFilter) {
47+
this.#selectionManager.setFilter((unique) => {
48+
const option = this.data?.options.find((o) => o.unique === unique);
49+
return option ? pickableFilter(option) : true;
50+
});
51+
}
52+
4453
// Only display variants that are relevant to pick from, i.e. variants that are draft or published with pending changes:
4554
this._options =
4655
this.data?.options.filter(

0 commit comments

Comments
 (0)