{"id":19301889,"url":"https://github.com/payloadcms/ordered-join","last_synced_at":"2025-04-12T07:23:38.637Z","repository":{"id":259947634,"uuid":"879889942","full_name":"payloadcms/ordered-join","owner":"payloadcms","description":"An experiment where we define a workflow for ordered / instantly editable joins","archived":false,"fork":false,"pushed_at":"2024-10-28T18:20:48.000Z","size":93,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-26T02:42:25.125Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/payloadcms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-28T18:16:04.000Z","updated_at":"2025-02-15T10:23:24.000Z","dependencies_parsed_at":"2024-10-28T19:42:10.431Z","dependency_job_id":null,"html_url":"https://github.com/payloadcms/ordered-join","commit_stats":null,"previous_names":["payloadcms/ordered-join"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/payloadcms%2Fordered-join","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/payloadcms%2Fordered-join/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/payloadcms%2Fordered-join/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/payloadcms%2Fordered-join/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/payloadcms","download_url":"https://codeload.github.com/payloadcms/ordered-join/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248531582,"owners_count":21119787,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T23:19:11.763Z","updated_at":"2025-04-12T07:23:38.615Z","avatar_url":"https://github.com/payloadcms.png","language":"TypeScript","readme":"# Ordered Join Field Demo\n\nThis is a demo of how to use the join field, but have it leverage an array-like UI in the Payload admin panel. Now, all \"joined\" documents are instantly editable without using drawers, and you can even control the order via the array UI.\n\n### How it works:\n\n1. We use an array field as a `virtual` field to benefit from its UI\n1. This array field is populated via an `afterRead` hook, using data from the join field\n1. In a `beforeChange` hook, we \"sync\" any changes made to the joined in posts. If there are differences, the post will automatically be updated.\n\nCheck out the Categories collection to see more.\n\n### Gotchas\n\n1. We need a `defaultLimit` property for our join field, (or `paginate: false`) so you can get more than 10 docs at once in the join field response. ETA Tues Oct 29, 2024\n1. If you delete a row from the UI, we don't handle the deletion of the joined doc. Could be messy. Might rather disable the `Remove` UI from the virtual array field\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpayloadcms%2Fordered-join","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpayloadcms%2Fordered-join","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpayloadcms%2Fordered-join/lists"}