Skip to content

Commit

Permalink
Merge branch 'V4' of github.com:WalletConnect/web3modal into feat/api…
Browse files Browse the repository at this point in the history
…-controller-tests
  • Loading branch information
tomiir committed Feb 21, 2024
2 parents 907d85f + dce495a commit 1ee5ded
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 1ee5ded

Please sign in to comment.