Skip to content

Commit

Permalink
idk man
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte committed Apr 15, 2024
1 parent f0c81e0 commit 6e48c36
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/bits-ui/src/lib/bits/accordion/accordion.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,9 @@ class AccordionContentState {
});
});

$effect(() => {
$effect.pre(() => {
// eslint-disable-next-line no-unused-expressions
this.item.isSelected;
const node = this.presentEl.value;
if (!node) return;

Expand All @@ -337,8 +339,6 @@ class AccordionContentState {
if (!this.isMountAnimationPrevented.value) {
const transitionDuration = this.currentStyle.value.transitionDuration;
const animationName = this.currentStyle.value.animationName;
console.log("transitionDuration", transitionDuration);
console.log("animationName", animationName);
if (transitionDuration) {
node.style.transitionDuration = transitionDuration;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@
{#if asChild}
{@render child?.({ props: { ...mergedProps, hidden: !present.value } })}
{:else}
<!-- HIDDEN DOESN'T WANT TO UPDATE!!! -->
<!-- eslint-disable-next-line -->
<div
hidden={!present.value}
{...mergedProps}
style={styleToString({
display: present.value ? undefined : "none",
"--bits-accordion-content-height": `${content.height.value}px`,
"--bits-accordion-content-width": `${content.width.value}px`,
})}
Expand Down

0 comments on commit 6e48c36

Please sign in to comment.