diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/utils/selection-manager/selection.manager.test.ts b/src/Umbraco.Web.UI.Client/src/packages/core/utils/selection-manager/selection.manager.test.ts index 7b4bf7e51e..18d8647457 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/utils/selection-manager/selection.manager.test.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/utils/selection-manager/selection.manager.test.ts @@ -77,8 +77,8 @@ describe('UmbSelectionManager', () => { expect(manager).to.have.property('clearSelection').that.is.a('function'); }); - it('has a setAllow method', () => { - expect(manager).to.have.property('setAllow').that.is.a('function'); + it('has a setAllowLimitation method', () => { + expect(manager).to.have.property('setAllowLimitation').that.is.a('function'); }); }); }); @@ -156,7 +156,7 @@ describe('UmbSelectionManager', () => { }); it('can not select an item if it does not pass the allow function', () => { - manager.setAllow((item) => item !== '2'); + manager.setAllowLimitation((item) => item !== '2'); expect(() => manager.select('2')).to.throw(); expect(manager.getSelection()).to.deep.equal([]); diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/utils/selection-manager/selection.manager.ts b/src/Umbraco.Web.UI.Client/src/packages/core/utils/selection-manager/selection.manager.ts index 58073bdb37..3e1cd91ca1 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/utils/selection-manager/selection.manager.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/utils/selection-manager/selection.manager.ts @@ -158,7 +158,7 @@ export class UmbSelectionManager boolean): void { + public setAllowLimitation(compareFn: (unique: ValueType) => boolean): void { this.#allow = compareFn; } } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/modals/schedule-modal/document-schedule-modal.element.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/modals/schedule-modal/document-schedule-modal.element.ts index fbef782e92..dc850eb0ad 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/modals/schedule-modal/document-schedule-modal.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/modals/schedule-modal/document-schedule-modal.element.ts @@ -44,7 +44,7 @@ export class UmbDocumentScheduleModalElement extends UmbModalBaseElement< const pickableFilter = this.data?.pickableFilter; if (pickableFilter) { - this.#selectionManager.setAllow((unique) => { + this.#selectionManager.setAllowLimitation((unique) => { const option = this.data?.options.find((o) => o.unique === unique); return option ? pickableFilter(option) : true; }); diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/modals/shared/document-variant-language-picker.element.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/modals/shared/document-variant-language-picker.element.ts index cf5f90efbf..ccfd6c36d4 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/modals/shared/document-variant-language-picker.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/modals/shared/document-variant-language-picker.element.ts @@ -50,7 +50,7 @@ export class UmbDocumentVariantLanguagePickerElement extends UmbLitElement { super.updated(_changedProperties); if (this.selectionManager && this.pickableFilter) { - this.#selectionManager.setAllow((unique) => { + this.#selectionManager.setAllowLimitation((unique) => { const option = this.variantLanguageOptions.find((o) => o.unique === unique); return option ? this.pickableFilter!(option) : true; });