-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ui): update relationship cell formatted value when when search changes #6208
fix(ui): update relationship cell formatted value when when search changes #6208
Conversation
packages/ui/src/elements/Table/DefaultCell/fields/Relationship/index.tsx
Outdated
Show resolved
Hide resolved
packages/ui/src/elements/Table/DefaultCell/fields/Relationship/index.tsx
Outdated
Show resolved
Hide resolved
This needs a test as well, elsewhere in our e2e test suites (probably Live Preview) Playwright is able to "watch" the network requests being made. That's what we need to do here for two tests at least, 1. to test that changing results (i.e. a new page) triggers new network requests (and updates the cell's HTML), and 2. to test that changing params but not results does not trigger a network request. |
Sorry, i could be wrong, but did you guys also consider to populate these server side, since we anyway are retrieving docs in the server component? We still want that's also debatable by UX i think, some people prefer this lazy loading thing and some don't want to see that something is still loading but don't might if the request would took a little bit longer. But of course if a bottleneck here is huge, then i'm totally wrong. |
@jacobsfletch I've added the first test - for |
Hey @r1tsuu yep in a much earlier version of Payload we did indeed load all relations via the dataloader, but the problem was when you have long pages with many rows on the screen at once (100+). The response was just huge. Keeping the initial load down as tiny as possible makes sure that the initial load is speedy all the time, and then we can lazy-load relations when they scroll onto the screen. But it's a good thought! I think this PR is good to go at this point, right? @jacobsfletch you wanna merge and we can get it out in a new beta? Thank you everyone! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this is actually causing some failing tests related to recursive dependencies. Will need to fix this before merging.
i'm on the fix for that right now - thanks for the help here everyone! |
Thanks @jacobsfletch @JessChowdhury for carrying here and @jmikrut for bumping this! |
Description
Fixes payloadcms/payload-3.0-demo#181
Although issue is about page changing, it happens as well when you change sort / limit / where filter (and probably locale)
Type of change
Checklist: