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

ListGroup.Item no longer getting the "active" class when active in 2.0.0-beta.5 #6001

Closed
ishields opened this issue Aug 26, 2021 · 1 comment · Fixed by #6002
Closed

ListGroup.Item no longer getting the "active" class when active in 2.0.0-beta.5 #6001

ishields opened this issue Aug 26, 2021 · 1 comment · Fixed by #6002
Labels

Comments

@ishields
Copy link

Describe the bug

Between versions 2.0.0-beta.4 and 2.0.0-beta.5, the behavior of defaultActiveId seems broken. When used correctly, the attribute should render an "active" class on the active ListGroup.Item. This no longer appears to be the case.

To Reproduce

In version versions 2.0.0-beta.4:

<ListGroup defaultActiveKey="#link1">
  <ListGroup.Item action href="#link1">
    Link 1
  </ListGroup.Item>
  <ListGroup.Item action href="#link2" disabled>
    Link 2
  </ListGroup.Item>
  <ListGroup.Item action>This one is a button</ListGroup.Item>
</ListGroup>

will render the following html:
image

Now switch to version 2.0.0-beta.5 (or 2.0.0-beta.6):

The same code renders the following html:
image

The "active" class is missing from the rendered html and as a result the styles are not correct.

Reproducible Example

versions 2.0.0-beta.4
https://codesandbox.io/s/shy-wildflower-x84k4?file=/src/App.js

Version 2.0.0-beta.5 (or 2.0.0-beta.6)
https://codesandbox.io/s/young-tree-8rxh0?file=/src/App.js

@ishields ishields changed the title ListGroupItem no longer getting the "active" class when active as defined by defaultActiveId ListGroup.Item no longer getting the "active" class when active as defined by defaultActiveId Aug 26, 2021
@ishields ishields changed the title ListGroup.Item no longer getting the "active" class when active as defined by defaultActiveId ListGroup.Item no longer getting the "active" class when active Aug 26, 2021
@ishields ishields changed the title ListGroup.Item no longer getting the "active" class when active ListGroup.Item no longer getting the "active" class when active in 2.0.0-beta.5 Aug 26, 2021
@kyletsang
Copy link
Member

kyletsang commented Aug 27, 2021

Broke during migration to @restart/ui. Need to use the hook instead of the component to get the true active state.

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

Successfully merging a pull request may close this issue.

2 participants