Implementing collapsible toasts in react-virtualized

15 Views Asked by At

I am trying to implement a react-virtualized list to display a list of Toast components coming from Salt Design System.

I want to hide some content initially and when user clicks on one of the toasts make it visible.

The content just shows up in the toast and doesn't push the remaining toast items below. enter image description here

I am struggling to understand how would I do it with react-virtualized, I don't see many examples on web which handles the use case to render such kind of lists.

I tried doing when a toast item is clicked, but that doesn't seem to work

listRef?.current?.recomputeRowHeights(index);
listRef?.current?.forceUpdateGrid();

Here's the Stackblitz Editor Link

0

There are 0 best solutions below