Skip to content

Commit

Permalink
fix: wui-list-accordion fix for wallet ui view (#1949)
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvoskamp authored Feb 21, 2024
1 parent 8289c8f commit dce495a
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions packages/ui/src/composites/wui-list-accordion/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,22 @@ export class WuiListAccordion extends LitElement {

// -- State & Properties -------------------------------- //
@property() public textTitle = ''

@property() public overflowedContent = ''

public toggled = false

public enableAccordion = false

public scrollElement?: Element = undefined

public scrollHeightElement = 0

public override firstUpdated() {
setTimeout(() => {
public override updated(changedProperties: Map<string | number | symbol, unknown>) {
super.updated(changedProperties)
if (changedProperties.has('textTitle') || changedProperties.has('overflowedContent')) {
this.checkHeight()
}
}

private checkHeight() {
this.updateComplete.then(() => {
const heightElement = this.shadowRoot?.querySelector('.heightContent')
const textElement = this.shadowRoot?.querySelector('.textContent')

Expand All @@ -41,7 +44,7 @@ export class WuiListAccordion extends LitElement {
this.requestUpdate()
}
}
}, 0)
})
}

// -- Render -------------------------------------------- //
Expand Down

0 comments on commit dce495a

Please sign in to comment.