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

Add props for open items #496

Closed
vaneatka opened this issue Aug 31, 2022 · 4 comments · Fixed by #497
Closed

Add props for open items #496

vaneatka opened this issue Aug 31, 2022 · 4 comments · Fixed by #497
Assignees
Labels
enhancement New feature or request

Comments

@vaneatka
Copy link

Is there possibility to add (or maybe it exists) to check which of items is open or not?

export interface AccordionProps {
items: ReadonlyArray;
duration: number;
multiple: boolean;
}
may contain an another active prop for an array of open props (by indexes).

@scriptex scriptex linked a pull request Aug 31, 2022 that will close this issue
@scriptex
Copy link
Owner

scriptex commented Aug 31, 2022

@vaneatka if I understand this correctly, you would like to specify which items are open initially, right?
If yes, please check if the linked PR works for you.
I've updated the documentation. You can check it out here

@scriptex scriptex self-assigned this Aug 31, 2022
@scriptex scriptex added the enhancement New feature or request label Aug 31, 2022
@scriptex
Copy link
Owner

scriptex commented Sep 1, 2022

@vaneatka this has been released and is available to download from NPM and Github.
For more info please see the release notes
Thank you for your contribution. 🎉

@vaneatka
Copy link
Author

vaneatka commented Sep 1, 2022

@scriptex thank you, basically the main purpose of my question was, to have a possibility to check which item is open...
To be able to switch the / (down) caret to /\ (up). In order to show open/close possibility.

@scriptex
Copy link
Owner

scriptex commented Sep 1, 2022

@vaneatka you could have done this by using the aria-expanded attribute in your CSS. If you are looking for an alternative solution, please show me your use case and I will try to help 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants