@onehat/ui 0.2.84 → 0.3.0
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onehat/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Base UI for OneHat apps",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"license": "UNLICENSED",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@onehat/data": "^1.
|
|
28
|
+
"@onehat/data": "^1.19.0",
|
|
29
29
|
"@hookform/resolvers": "^3.3.1",
|
|
30
30
|
"@k-renwick/colour-mixer": "^1.2.1",
|
|
31
31
|
"@reduxjs/toolkit": "^1.9.5",
|
|
@@ -287,12 +287,14 @@ function Form(props) {
|
|
|
287
287
|
return <Element key={ix} title={title} {...defaults} {...propsToPass} {...editorTypeProps}>{children}</Element>;
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
+
if (!label && Repository && model[name].title) {
|
|
291
|
+
label = model[name].title;
|
|
292
|
+
}
|
|
293
|
+
|
|
290
294
|
if (isViewOnly || !isEditable) {
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
}
|
|
295
|
-
const value = (record && record[name]) || (startingValues && startingValues[name]) || null;
|
|
295
|
+
const
|
|
296
|
+
Text = getComponentFromType('Text'),
|
|
297
|
+
value = (record && record[name]) || (startingValues && startingValues[name]) || null;
|
|
296
298
|
let element = <Text
|
|
297
299
|
value={value}
|
|
298
300
|
{...propsToPass}
|
|
@@ -307,9 +309,6 @@ function Form(props) {
|
|
|
307
309
|
return <Row key={ix} px={2} pb={1}>{element}</Row>;
|
|
308
310
|
}
|
|
309
311
|
|
|
310
|
-
if (!label && Repository && model.titles?.[name]) {
|
|
311
|
-
label = model.titles[name];
|
|
312
|
-
}
|
|
313
312
|
|
|
314
313
|
|
|
315
314
|
// // These rules are for fields *outside* the model
|