diff --git a/src/components/select/bl-select.css b/src/components/select/bl-select.css index 4fadb168..6a7621fa 100644 --- a/src/components/select/bl-select.css +++ b/src/components/select/bl-select.css @@ -29,7 +29,7 @@ --popover-position: var(--bl-popover-position, fixed); } -:host([multiple]:not([hide-select-all])) .select-wrapper { +:host([multiple][view-select-all]) .select-wrapper { --menu-height: 290px; } diff --git a/src/components/select/bl-select.stories.mdx b/src/components/select/bl-select.stories.mdx index 1451e886..efc1258b 100644 --- a/src/components/select/bl-select.stories.mdx +++ b/src/components/select/bl-select.stories.mdx @@ -98,7 +98,7 @@ export const SelectTemplate = (args) => html` {SelectTemplate.bind({})} - + {SelectTemplate.bind({})} diff --git a/src/components/select/bl-select.test.ts b/src/components/select/bl-select.test.ts index 5336123d..9d6bd469 100644 --- a/src/components/select/bl-select.test.ts +++ b/src/components/select/bl-select.test.ts @@ -539,7 +539,7 @@ describe("bl-select", () => { describe("select all", () => { it("should select all options", async () => { - const el = await fixture(html` + const el = await fixture(html` Option 1 Option 2 Option 3 @@ -561,7 +561,7 @@ describe("bl-select", () => { }); it("should deselect all options", async () => { - const el = await fixture(html` + const el = await fixture(html` Option 1 Option 2 Option 3 @@ -585,7 +585,7 @@ describe("bl-select", () => { }); it("should not act on disabled options", async () => { - const el = await fixture(html` + const el = await fixture(html` Option 1 Option 2 Option 3 @@ -608,7 +608,7 @@ describe("bl-select", () => { }); it("should display indeterminate state when some options are selected", async () => { - const el = await fixture(html` + const el = await fixture(html` Option 1 Option 2 Option 3 @@ -623,7 +623,7 @@ describe("bl-select", () => { }); it('should uncheck "select all" checkbox when all available options are selected', async () => { - const el = await fixture(html` + const el = await fixture(html` Option 1 Option 2 Option 3 diff --git a/src/components/select/bl-select.ts b/src/components/select/bl-select.ts index 77f82bf7..dbff8254 100644 --- a/src/components/select/bl-select.ts +++ b/src/components/select/bl-select.ts @@ -145,10 +145,10 @@ export default class BlSelect extends Form customInvalidText?: string; /** - * Hides select all option in multiple select + * Views select all option in multiple select */ - @property({ type: Boolean, attribute: "hide-select-all" }) - hideSelectAll = false; + @property({ type: Boolean, attribute: "view-select-all" }) + viewSelectAll = false; /** * Sets select all text in multiple select @@ -353,7 +353,7 @@ export default class BlSelect extends Form } selectAllTemplate() { - if (!this.multiple || this.hideSelectAll) { + if (!this.multiple || !this.viewSelectAll) { return null; }