Move collection description rendering to JSON (#6944)

* First pass, moving collection description rendering to JSON

* tsc

* docs

* refactor

* test
This commit is contained in:
Tom Moor
2024-05-25 18:17:19 -04:00
committed by GitHub
parent d51267b8bc
commit f103d73b48
15 changed files with 225 additions and 81 deletions

View File

@@ -65,7 +65,7 @@ function CollectionDescription({ collection }: Props) {
debounce(async (getValue) => {
try {
await collection.save({
description: getValue(),
data: getValue(false),
});
setDirty(false);
} catch (err) {
@@ -109,7 +109,7 @@ function CollectionDescription({ collection }: Props) {
>
<Editor
key={key}
defaultValue={collection.description || ""}
defaultValue={collection.data}
onChange={handleChange}
placeholder={placeholder}
readOnly={!isEditing}