question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SimpleListItem's isCurrent prop not behaving as expected

See original GitHub issue

Describe the issue. What is the expected and unexpected behavior? SimpleListItem accepts isCurrent that is described as “Indicates if the link is current/highlighted”, allowing manual control. In practice though, isCurrent is only the initial state and is overwritten by SimpleListItem’s internal state when something on the list is clicked.

Please provide the steps to reproduce. Feel free to link CodeSandbox or another tool. An Item in a SimpleList’s isCurrent prop can be hardcoded to true, making it highlighted, then click an item. It will behave as if the prop was never set and only the clicked on Item will be highlighted.

Is this a bug or enhancement? If this issue is a bug, is this issue blocking you or is there a work-around? Bug, not blocking.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
wojtacommented, Nov 5, 2020

@tlabaj taking this one

1reaction
kmcfaulcommented, Oct 14, 2020

Yes, but using a new flag like isUncontrolled. Then if present, isCurrent would be the only thing determining if an item is current.

And I agree that we should update the prop name to defaultIsCurrent (well, technically add this prop because isCurrent will still be used) and then use that for the controlled SimpleList.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Props description not rendering as expected #137 - GitHub
I've installed this module this morning and it all seems to be working as expected apart from rendering a description in the table....
Read more >
valid prop not works in the styled-component. It gives a warning
As the type error explained, valid is a invalid prop. You should use shouldForwardProp in your styled component so the valid prop does...
Read more >
tipi | Tiny templating language written in Scala - kandi - Open Weaver
Implement tipi with how-to, Q&A, fixes, code snippets. kandi ratings - Low support, No Bugs, No Vulnerabilities. No License, Build not available.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found