Skip to content

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

@Andrewgdewar

Description

@Andrewgdewar

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions