diff --git a/package.json b/package.json index 2d901e8..b391df4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@vaadin-component-factory/vcf-anchor-nav", - "version": "3.0.0", + "version": "3.0.1", "description": "Component with tabs used as anchor navigation and content sections. Automates the linking of tabs and sections.", "main": "vcf-anchor-nav.js", "author": "Vaadin Ltd", diff --git a/src/vcf-anchor-nav-section.js b/src/vcf-anchor-nav-section.js index deb84b7..4961946 100644 --- a/src/vcf-anchor-nav-section.js +++ b/src/vcf-anchor-nav-section.js @@ -53,7 +53,6 @@ class AnchorNavSectionElement extends ElementMixin(ThemableMixin(PolymerElement) border-bottom: var(--anchor-nav-section-border-width) solid var(--anchor-nav-section-border-color); } - #defaultHeader, ::slotted([slot='header']) { margin: 0; padding: var(--lumo-space-m); @@ -115,8 +114,8 @@ class AnchorNavSectionElement extends ElementMixin(ThemableMixin(PolymerElement) } _createHeader() { - const customHeader = this.querySelector('h2'); - if (customHeader && customHeader.assignedSlot && customHeader.assignedSlot.name == 'header') { + const customHeader = this.querySelector('[slot="header"]'); + if (customHeader) { customHeader.setAttribute('id', this.headerId); } else { const header = document.createElement('h2');