Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In collapse's header slot, return collapse status as a paramer #3723

Closed
wc-davide opened this issue Sep 15, 2022 · 0 comments
Closed

In collapse's header slot, return collapse status as a paramer #3723

wc-davide opened this issue Sep 15, 2022 · 0 comments
Labels
feature request New feature or request

Comments

@wc-davide
Copy link

This function solves the problem (这个功能解决的问题)

In my collapse I have a custom #header slot and would like to change its value based on the status of the collapse (collapsed or expanded); something like a "show more" - "show less".
Unfortunately, the parameter returning the collapse status is only available for the #arrow slot so I'm not able to determine if the collapse is expanded or collapsed from the #header slot.

Expected API (期望的 API)

Exactly like for the #arrow slot: (options: { collapsed: boolean }).
As described in https://www.naiveui.com/en-US/os-theme/components/collapse#CollapseItem-Slots

image

@github-actions github-actions bot added the feature request New feature or request label Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant