Skip to content

Commit

Permalink
perf(library): add library runtime util functionality for custom comp…
Browse files Browse the repository at this point in the history
…onents
  • Loading branch information
jordanjones243 committed May 3, 2024
1 parent cb39423 commit 56e8255
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/auro-combobox.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { LitElement } from "lit";
import { html } from 'lit/static-html.js';
import { AuroDependencyVersioning } from '@aurodesignsystem/auro-library/scripts/runtime/dependencyTagVersioning.mjs';

import AuroLibraryRuntimeUtils from '@aurodesignsystem/auro-library/scripts/utils/runtimeUtils.mjs';
import AuroFormValidation from '@aurodesignsystem/auro-formvalidation/src/validation.js';

/* eslint-disable max-lines, lit/binding-positions, lit/no-invalid-html */
Expand Down Expand Up @@ -60,6 +61,11 @@ export class AuroCombobox extends LitElement {
*/
this.validation = new AuroFormValidation();

/**
* @private
*/
this.runtimeUtils = new AuroLibraryRuntimeUtils();

/**
* Generate unique names for dependency components.
*/
Expand Down Expand Up @@ -510,6 +516,9 @@ export class AuroCombobox extends LitElement {
}

firstUpdated() {
// Add the tag name as an attribute if it is different than the component name
this.runtimeUtils.handleComponentTagRename(this, 'auro-datepicker');

this.dropdown = this.shadowRoot.querySelector(this.dropdownTag._$litStatic$); // eslint-disable-line no-underscore-dangle
this.menu = this.querySelector('auro-menu');
this.input = this.dropdown.querySelector(this.inputTag._$litStatic$); // eslint-disable-line no-underscore-dangle
Expand Down Expand Up @@ -653,7 +662,6 @@ export class AuroCombobox extends LitElement {
?error="${this.validity !== undefined && this.validity !== 'valid'}"
disableEventShow>
<${this.inputTag}
auro-input
slot="trigger"
bordered
?required="${this.required}"
Expand Down

0 comments on commit 56e8255

Please sign in to comment.