esoftplay 0.0.220 → 0.0.221
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/modules/lib/compose.tsx +8 -7
- package/package.json +1 -1
package/modules/lib/compose.tsx
CHANGED
|
@@ -213,15 +213,16 @@ export default function m(props: LibComposeProps): any {
|
|
|
213
213
|
let [_schema, _setSchema, _getSchema] = useLazyState(props.schema)
|
|
214
214
|
const [state] = schema.useState()
|
|
215
215
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
216
|
+
if (props.id)
|
|
217
|
+
UserRoutes.state().listen(() => {
|
|
218
|
+
if (state.length)
|
|
219
|
+
for (const row of state) {
|
|
220
|
+
if (UserRoutes.getCurrentRouteName() == row?.module && row?.schema && row.id == props.id) {
|
|
221
|
+
_setSchema(row?.schema)
|
|
222
|
+
}
|
|
221
223
|
}
|
|
222
|
-
}
|
|
223
224
|
_setSchema(_getSchema())()
|
|
224
|
-
|
|
225
|
+
})
|
|
225
226
|
|
|
226
227
|
return Boolean(_schema)
|
|
227
228
|
? renderUIFromJSON(_schema)
|