Comments (9)
The same happens in existing posts, for any array item where the collapsed preference has not been saved yet.
from payload.
Aside: In our use-case it would be preferable if the preferences would not be persisted in the document creation page.
from payload.
We need to make sure that the preferences for fields only send if the document ID is present. This should be fixed with one small condition being added to the collapsible field as well as any other field level preferences.
from payload.
@DanRibbens that would be ideal. Although note that the issue in this bug report is not exactly that one. It is specifically related to preferences of collapsibles when used inside of array fields, and happens in existing documents as well, so they can probably be dealt with separately.
It is a less important issue though. What you describe seems more important and would have the most impact in usability.
from payload.
Created another ticket to track that issue: #5747
from payload.
Hey @franciscolourenco just looked into this and the root of the problem here is exactly what @DanRibbens suggested. In your screen recording I can see that your preferences doc has the key
property set to undefined
. This should be the ID of the document, but obviously new documents don't have a key yet. They simply shouldn't save any preferences (just as you've described in #5747). This fix will close both issuesβinitCollapsed
was not being respected because it wrongly found preferences which held it open.
from payload.
I can reproduce this issue in an existing document, so it seems they are independent issues:
- If there are no preferences for the array field at all, the initCollapsed option is respected.
- From the moment that preferences are saved for one of the array items, initCollapsed is ignored for all array items, and it defaults to expanded if an array item doesn't have preferences.
This issue seems minor, but still there:
Existing.Document.mp4
from payload.
Thank you for the follow-up π. @PatrikKozak can you look into this?
from payload.
@jacobsfletch @franciscolourenco Yup looking into this.
from payload.
Related Issues (20)
- min/max not used in HTML input component HOT 1
- Forgot Password not working
- Public assets (fonts) are not added with beta init script
- Duplicating a published version-enabled document results in a published copy HOT 1
- Required fields in non-default locales can get published via the default locale
- postgres vercel column "prefix" does not exist HOT 4
- Duplicate documents with richtext fields in blocks in different locales
- Non-translated word "document" when creating a record HOT 3
- Default value not selected by default when creating a new user HOT 1
- [3.0 Beta] Wrong @payload-config path in create-payload-app HOT 1
- Error running npx create-payload-app@beta
- [3.0 Beta] Plugin-SEO has "exports": null in package.json HOT 2
- [3.0 Beta] Drizzle / Postgres Adapter not working with --turbo enabled HOT 2
- fieldSchema is undefined for all fields retrieved via hooks
- [3.0 Beta] Changes not applying to tables when using schemaName HOT 5
- error /home/node/app/node_modules/payload/node_modules/sharp: Command failed HOT 2
- Dockerfile optimization and issues
- Publishing not working / changes reverted when using bulk edit / publish tools in CMS
- Context not being passed from `beforeDelete` to `afterDelete` collection hooks.
- 404 link in the breadcrumbs of /account if the admin panel auth collection has admin.hidden enabled
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from payload.