Skip to content

Commit 1abe229

Browse files
committed
update method name
1 parent c4bb356 commit 1abe229

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/packages/core/utils/selection-manager/selection.manager.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ describe('UmbSelectionManager', () => {
7777
expect(manager).to.have.property('clearSelection').that.is.a('function');
7878
});
7979

80-
it('has a setAllow method', () => {
81-
expect(manager).to.have.property('setAllow').that.is.a('function');
80+
it('has a setAllowLimitation method', () => {
81+
expect(manager).to.have.property('setAllowLimitation').that.is.a('function');
8282
});
8383
});
8484
});
@@ -156,7 +156,7 @@ describe('UmbSelectionManager', () => {
156156
});
157157

158158
it('can not select an item if it does not pass the allow function', () => {
159-
manager.setAllow((item) => item !== '2');
159+
manager.setAllowLimitation((item) => item !== '2');
160160
expect(() => manager.select('2')).to.throw();
161161
expect(manager.getSelection()).to.deep.equal([]);
162162

src/packages/core/utils/selection-manager/selection.manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export class UmbSelectionManager<ValueType extends string | null = string | null
158158
* @param compareFn A function that determines if an item is selectable or not.
159159
* @memberof UmbSelectionManager
160160
*/
161-
public setAllow(compareFn: (unique: ValueType) => boolean): void {
161+
public setAllowLimitation(compareFn: (unique: ValueType) => boolean): void {
162162
this.#allow = compareFn;
163163
}
164164
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class UmbDocumentScheduleModalElement extends UmbModalBaseElement<
4444
const pickableFilter = this.data?.pickableFilter;
4545

4646
if (pickableFilter) {
47-
this.#selectionManager.setAllow((unique) => {
47+
this.#selectionManager.setAllowLimitation((unique) => {
4848
const option = this.data?.options.find((o) => o.unique === unique);
4949
return option ? pickableFilter(option) : true;
5050
});

src/packages/documents/documents/modals/shared/document-variant-language-picker.element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class UmbDocumentVariantLanguagePickerElement extends UmbLitElement {
5050
super.updated(_changedProperties);
5151

5252
if (this.selectionManager && this.pickableFilter) {
53-
this.#selectionManager.setAllow((unique) => {
53+
this.#selectionManager.setAllowLimitation((unique) => {
5454
const option = this.variantLanguageOptions.find((o) => o.unique === unique);
5555
return option ? this.pickableFilter!(option) : true;
5656
});

0 commit comments

Comments
 (0)