ywana-core8 0.0.794 → 0.0.796
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/dist/index.cjs +28 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +28 -11
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +28 -11
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain2/CollectionContext.js +10 -0
- package/src/domain2/DynamicForm.js +1 -1
package/package.json
CHANGED
@@ -48,6 +48,15 @@ export const CollectionContextProvider = (props) => {
|
|
48
48
|
}
|
49
49
|
return
|
50
50
|
}
|
51
|
+
|
52
|
+
async function reload() {
|
53
|
+
try {
|
54
|
+
const data = await load()
|
55
|
+
setAll(data)
|
56
|
+
} catch (error) {
|
57
|
+
console.log(error)
|
58
|
+
}
|
59
|
+
}
|
51
60
|
|
52
61
|
async function select(id) {
|
53
62
|
if (fetching) {
|
@@ -142,6 +151,7 @@ export const CollectionContextProvider = (props) => {
|
|
142
151
|
const value = {
|
143
152
|
all,
|
144
153
|
load,
|
154
|
+
reload,
|
145
155
|
|
146
156
|
selected,
|
147
157
|
select,
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import { CheckBox, ColorField, DateRange, DropDown, TextField, TokenField } from '../html'
|
3
3
|
import { FORMATS } from './FORMATS'
|
4
|
-
import './DynamicForm.css'
|
5
4
|
import { TYPES } from './TYPES'
|
5
|
+
import './DynamicForm.css'
|
6
6
|
|
7
7
|
/**
|
8
8
|
* Dynamic Form
|