ywana-core8 0.0.724 → 0.0.726
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/package.json
CHANGED
@@ -46,7 +46,7 @@ export const CollectionContextProvider = (props) => {
|
|
46
46
|
}
|
47
47
|
return
|
48
48
|
}
|
49
|
-
|
49
|
+
|
50
50
|
async function select(id) {
|
51
51
|
if (fetching) {
|
52
52
|
const result = await fetch(id)
|
@@ -56,6 +56,10 @@ export const CollectionContextProvider = (props) => {
|
|
56
56
|
setSelected(result)
|
57
57
|
}
|
58
58
|
}
|
59
|
+
|
60
|
+
function clearSelection() {
|
61
|
+
setSelected(null)
|
62
|
+
}
|
59
63
|
|
60
64
|
async function addCustomFilter(id, filter) {
|
61
65
|
setCustomFilters( prevState => {
|
@@ -87,9 +91,6 @@ export const CollectionContextProvider = (props) => {
|
|
87
91
|
}
|
88
92
|
|
89
93
|
|
90
|
-
function clear() {
|
91
|
-
this.selected = null
|
92
|
-
}
|
93
94
|
|
94
95
|
async function create(form) {
|
95
96
|
try {
|
@@ -152,6 +153,7 @@ export const CollectionContextProvider = (props) => {
|
|
152
153
|
|
153
154
|
selected,
|
154
155
|
select,
|
156
|
+
clearSelection,
|
155
157
|
|
156
158
|
filters,
|
157
159
|
setFilters,
|