Collapsible dysfunctional after remove_children() #6101
-
Beta Was this translation helpful? Give feedback.
Answered by
willmcgugan
Sep 3, 2025
Replies: 1 comment 2 replies
-
You should probably explain why you want to do this, as it feels like an odd requirement. However, any of these solutions should work:
The reason it is breaking, is because the Collapsible has children of its own, and you are removing them. I think this will remove all the children. await self.query_one("Collapsible Content").remove_children() However I would consider the other solutions first. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
tibor95
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should probably explain why you want to do this, as it feels like an odd requirement.
However, any of these solutions should work:
The reason it is breaking, is because the Collapsible has children of its own, and you are removing them.
I think this will remove all the children.
However I would consider the other solutions first.