patternfly-react icon indicating copy to clipboard operation
patternfly-react copied to clipboard

Bug - Pagination: Id on main container and on perPage button incrementing on repeated renders

Open Andrewgdewar opened this issue 3 years ago • 0 comments

This variable seems to be getting incremented to infinity by this.

If the above methodology is the root of the issue, I would suggest simple removing the "paginationId" variable. As unique IDs/keys are more commonplace to satisfy its implementation.

button

After a further look, it appears as though a similar style of id setting is also occurring on most buttons/select components.

Further observations: I am using react-query, I discovered that if you have a react Context inside another react Context, you see the above behaviour. For my use case I can simply re-architect my page to only use 1 layer of context, but there are use cases where components have their own internal context, and apps may have top level context as well.

In such cases you will likely see the above occur, a re-rendering heartbeat of all buttons within the second context.

Andrewgdewar avatar Jul 27 '22 20:07 Andrewgdewar