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

MaterialCollapsible setting active index with 1 as start #998

Closed
wassx opened this issue Jan 8, 2021 · 2 comments
Closed

MaterialCollapsible setting active index with 1 as start #998

wassx opened this issue Jan 8, 2021 · 2 comments

Comments

@wassx
Copy link
Contributor

wassx commented Jan 8, 2021

It seems pretty uncommon why there is a range start from 1 for the index.
GWT.log("The active index must be a one-base index to mark as active.", new IndexOutOfBoundsException());
What is the reason for this design please?

@kevzlou7979
Copy link
Contributor

Patched the issue and standardized the collapsible item to have a 0-starting based index. 60d3d21

Please review the changes and might be good to test it out too.

@ingosch
Copy link

ingosch commented Aug 5, 2021

setActive(0) is not working cause of condition "index > 0" in line 258. Must be "index >= 0".

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

No branches or pull requests

3 participants