@tinacms/app 0.0.0-20230516192308 → 0.0.0-20230516194926
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -3
- package/package.json +3 -3
- package/src/lib/graphql-reducer.ts +2 -1
- package/src/lib/util.ts +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# @tinacms/app
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-20230516194926
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- 7f95c1ce5: Reorganize the way fields are presented on the form to allow for deep-linking
|
|
8
8
|
- Updated dependencies [b3d98d159]
|
|
9
9
|
- Updated dependencies [7f95c1ce5]
|
|
10
|
-
- @tinacms/toolkit@0.0.0-
|
|
11
|
-
- tinacms@0.0.0-
|
|
10
|
+
- @tinacms/toolkit@0.0.0-20230516194926
|
|
11
|
+
- tinacms@0.0.0-20230516194926
|
|
12
12
|
|
|
13
13
|
## 1.2.12
|
|
14
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/app",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-20230516194926",
|
|
4
4
|
"main": "src/main.tsx",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"devDependencies": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"typescript": "^4.6.4",
|
|
29
29
|
"zod": "^3.14.3",
|
|
30
30
|
"@tinacms/mdx": "1.3.10",
|
|
31
|
-
"@tinacms/toolkit": "0.0.0-
|
|
32
|
-
"tinacms": "0.0.0-
|
|
31
|
+
"@tinacms/toolkit": "0.0.0-20230516194926",
|
|
32
|
+
"tinacms": "0.0.0-20230516194926"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -431,7 +431,7 @@ export const useGraphQLReducer = (
|
|
|
431
431
|
} else {
|
|
432
432
|
if (result.data) {
|
|
433
433
|
setResults((results) => [
|
|
434
|
-
...results,
|
|
434
|
+
...results.filter((result) => result.id !== payload.id),
|
|
435
435
|
{ id: payload.id, data: result.data },
|
|
436
436
|
])
|
|
437
437
|
}
|
|
@@ -494,6 +494,7 @@ export const useGraphQLReducer = (
|
|
|
494
494
|
if (event.data.type === 'field:selected') {
|
|
495
495
|
const [queryId, eventFieldName] = event.data.fieldName.split('---')
|
|
496
496
|
const result = results.find((res) => res.id === queryId)
|
|
497
|
+
console.log(results)
|
|
497
498
|
if (result?.data) {
|
|
498
499
|
cms.dispatch({
|
|
499
500
|
type: 'forms:set-active-field-name',
|
package/src/lib/util.ts
CHANGED
|
@@ -113,7 +113,12 @@ export const getFormAndFieldNameFromMetadata = (
|
|
|
113
113
|
? fieldName.slice(value?.name?.length + 1)
|
|
114
114
|
: fieldName
|
|
115
115
|
if (localFieldName) {
|
|
116
|
-
|
|
116
|
+
// If localFieldName is tags.2, just use `tags`
|
|
117
|
+
if (!isNaN(Number(localFieldName.split('.')[1]))) {
|
|
118
|
+
n = value.fields[localFieldName.split('.')[0]]
|
|
119
|
+
} else {
|
|
120
|
+
n = value.fields[localFieldName]
|
|
121
|
+
}
|
|
117
122
|
} else {
|
|
118
123
|
n = value.name
|
|
119
124
|
}
|