Skip to content

Conversation

@TBThomas56
Copy link
Contributor

No description provided.

);

const [isPaginated, setIsPaginated] = useState(false);
const isPaginated = useRef(false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm struggling to understand the whole pagination system, but I'm not sure that this can just be substituted like this - previously, the state and its setter got passed down to the WorkflowsContent and it got changed from there, but now I think the isPaginated.current value would only be passed down when the component renders and any changes to isPaginatedRef in the WorkflowsContent won't be seen back here. This seems to start false, get set to true in the useEffect, then have no way of changing back.

I had a bit of a play around with this in the browser and I didn't see any faulty behaviour, so it's possible that the dependencies and re-rendering of components happens to make this irrelevant, but I do think this could use a bit of a closer look. Sorry I can't be any more specific than that...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I agree with this. Have added a callback to allow the bi-directional data flow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants