carbon-addons-iot-react
carbon-addons-iot-react copied to clipboard
[SideNav] renderedFilterableLinks state prevents SideNav links from being update
What package is this for?
- [X] React
- [ ] Angular
Describe the bug
Lines 320-322 in SideNav.js make it impossible to update the links sent to SideNav, because renderedFilterableLinks never accounts for changes to filterableLinks (e.g. changes to isActive).
const [renderedFilterableLinks, setRenderedFilterableLinks] = useState(
renderLinks(filterableLinks)
);
Hi @jeffrey-pinyan-cleandns, thanks for submitting the issue. Can you provide a little more detail on your setup and issue so we can help resolve? As you can see in this story, we have the filterable links set and are able to update the isActive prop. Here is the code for the story where we are updating the state of the links