Skip to content

Commit

Permalink
fix(collapsible): resolve an issue that the height was not measured c…
Browse files Browse the repository at this point in the history
…orrectly
  • Loading branch information
cschroeter committed Apr 18, 2024
1 parent ccb1fa5 commit 40f3703
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/sour-stingrays-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zag-js/collapsible": patch
---

Resolve an issue that sometimes the collapsible height was not measured correctly
2 changes: 1 addition & 1 deletion .xstate/collapsible.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const fetchMachine = createMachine({
actions: ["invokeOnOpen"]
}, {
target: "open",
actions: ["allowAnimation", "invokeOnOpen"]
actions: ["allowAnimation", "invokeOnOpen", "computeSize"]
}]
}
},
Expand Down
2 changes: 1 addition & 1 deletion packages/machines/collapsible/src/collapsible.machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function machine(userContext: UserDefinedContext) {
},
{
target: "open",
actions: ["allowAnimation", "invokeOnOpen"],
actions: ["allowAnimation", "invokeOnOpen", "computeSize"],
},
],
},
Expand Down

0 comments on commit 40f3703

Please sign in to comment.