@onehat/ui 0.3.154 → 0.3.157

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.154",
3
+ "version": "0.3.157",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -15,7 +15,11 @@ const ButtonComponent = function(props) {
15
15
  self.ref = buttonRef.current;
16
16
  }
17
17
 
18
- return <Button ref={buttonRef} {...props}>{text}</Button>;
18
+ if (text) {
19
+ return <Button ref={buttonRef} {...props}>{text}</Button>;
20
+ }
21
+
22
+ return <Button ref={buttonRef} {...props} />;
19
23
  }
20
24
 
21
25
  export default withComponent(ButtonComponent);
@@ -614,6 +614,9 @@ function Form(props) {
614
614
  {...propsToPass}
615
615
  />;
616
616
  if (title) {
617
+ if (record?.displayValue) {
618
+ title += ' for ' + record.displayValue;
619
+ }
617
620
  title = <Text
618
621
  fontSize={styles.FORM_ANCILLARY_TITLE_FONTSIZE}
619
622
  fontWeight="bold"
@@ -67,10 +67,14 @@ function Viewer(props) {
67
67
  items,
68
68
  // onChange: onEditorChange,
69
69
  useSelectorId = false,
70
+ isHiddenInViewMode = false,
70
71
  ...propsToPass
71
72
  } = item,
72
73
  editorTypeProps = {};
73
74
 
75
+ if (isHiddenInViewMode) {
76
+ return;
77
+ }
74
78
  const propertyDef = name && Repository?.getSchema().getPropertyDefinition(name);
75
79
  if (!type) {
76
80
  if (propertyDef?.viewerType) {