Skip to content

Commit fba2fce

Browse files
committed
Update demo
1 parent 574f2c1 commit fba2fce

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ You can specify what should be matched by setting `searchFilter` to either `"key
236236
( { key, path, level, value, ...etc }:FilterFunctionInput, searchText:string ) => boolean
237237
```
238238

239-
There are two helper functions (`matchNode()` and `matchNodeKey()`) exported with the package that might make creating your search function easier (these are the functions used internally for the `"key"` and `"value"` matches described above). You can see what they do [here](#linktocodebase).
239+
There are two helper functions (`matchNode()` and `matchNodeKey()`) exported with the package that might make creating your search function easier (these are the functions used internally for the `"key"` and `"value"` matches described above). You can see what they do [here](https://github.com./CarlosNZ/json-edit-react/blob/574f2c1ba3e724c93ce8ab9cdba2fe8ebbbbf806/src/filterHelpers.ts#L64-L95).
240240

241241
An example custom search function can be seen in the [Demo](#https://carlosnz.github.io/json-edit-react/) with the "Client list" data set -- the search function matches by name and username, and makes the entire "Client" object visible when one of those matches, so it can be used to find a particular person and edit their specific details:
242242

demo/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@types/react-dom": "^18.2.18",
1818
"firebase": "^10.7.2",
1919
"framer-motion": "^11.0.3",
20-
"json-edit-react": "^1.6.1",
20+
"json-edit-react": "^1.7.0",
2121
"just-compare": "^2.3.0",
2222
"react": "^18.2.0",
2323
"react-datepicker": "^5.0.0",

demo/src/JsonEditImport.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import {
1212
LinkCustomNodeDefinition,
1313
matchNode,
1414
assign,
15-
} from './json-edit-react/src'
16-
// } from 'json-edit-react'
15+
// } from './json-edit-react/src'
16+
} from 'json-edit-react'
1717
// } from './package'
1818

1919
export {

demo/src/useDatabase.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getFirestore, doc, setDoc, DocumentData } from 'firebase/firestore'
1+
import { getFirestore, doc, setDoc } from 'firebase/firestore'
22
import { initializeApp } from 'firebase/app'
33
import { useDocument } from 'react-firebase-hooks/firestore'
44
import firebaseConfig from './firebaseConfig.json'

demo/src/version.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const version = '1.6.1'
1+
export const version = '1.7.0'

demo/yarn.lock

+9-9
Original file line numberDiff line numberDiff line change
@@ -7698,14 +7698,14 @@ jsesc@~0.5.0:
76987698
resolved "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz"
76997699
integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==
77007700

7701-
json-edit-react@^1.6.1:
7702-
version "1.6.1"
7703-
resolved "https://registry.yarnpkg.com/json-edit-react/-/json-edit-react-1.6.1.tgz#a7b3c3ea7bd768faa5f52083d8b08c01c16cf95e"
7704-
integrity sha512-kQbtVpy66czFDseP7i5vqeK652aktb3tlGFMq+EtykhKhNFD2Lu+jkL8K6C8bq0QQJkWmVU3drLuO+72RBN8rw==
7701+
json-edit-react@^1.7.0:
7702+
version "1.7.0"
7703+
resolved "https://registry.yarnpkg.com/json-edit-react/-/json-edit-react-1.7.0.tgz#c56b9fcebf1efb19e136f742e10556e2fd718691"
7704+
integrity sha512-w/y/XT/8m8zUFPvVcJrn9Cxp+mb/QTm9Va/1dX2QsX9V2En5aYioFSXRDLkLpKC+84xSIUvcySZr43LzIgYA1A==
77057705
dependencies:
77067706
json5 "^2.2.3"
77077707
just-clone "^6.2.0"
7708-
object-property-assigner "^1.2.1"
7708+
object-property-assigner "^1.2.2"
77097709
object-property-extractor "^1.0.10"
77107710

77117711
json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1:
@@ -8284,10 +8284,10 @@ object-keys@^1.1.1:
82848284
resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz"
82858285
integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==
82868286

8287-
object-property-assigner@^1.2.1:
8288-
version "1.2.1"
8289-
resolved "https://registry.yarnpkg.com/object-property-assigner/-/object-property-assigner-1.2.1.tgz#ec16ecefd940d0fb973d392000c5744cbc1066c3"
8290-
integrity sha512-sMf0u3+7efLtYIjsuUec6lsjIm2cx+Kv3wsxhtiifQSgq1sFrKXUDCU0RQo52sKd1eN+VHhjePvtNDzbTdH27w==
8287+
object-property-assigner@^1.2.2:
8288+
version "1.2.2"
8289+
resolved "https://registry.yarnpkg.com/object-property-assigner/-/object-property-assigner-1.2.2.tgz#bc07ada5673892913d5206d4daf28e3c5cdc16b8"
8290+
integrity sha512-/t/aeJgDlP3FQTfVs+7XhLWe1WjH4V2TLX2Q0g++APfa7gHrtIB8HKuTUpH77LFOw9Rm0HyVW7t34KKRUAxF4A==
82918291

82928292
object-property-extractor@^1.0.10:
82938293
version "1.0.10"

0 commit comments

Comments
 (0)