@react-typed-forms/schemas-html 4.1.0 → 4.1.1
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/lib/components/DefaultDisplayOnly.d.ts +3 -2
- package/lib/index.cjs +4 -2
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +4 -2
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -545,12 +545,13 @@ function DefaultDisplayOnly({
|
|
|
545
545
|
style,
|
|
546
546
|
renderer,
|
|
547
547
|
textClass,
|
|
548
|
-
inline
|
|
548
|
+
inline,
|
|
549
|
+
state
|
|
549
550
|
}) {
|
|
550
551
|
var _effect = useComponentTracking();
|
|
551
552
|
try {
|
|
552
553
|
var _ref;
|
|
553
|
-
const text = (_ref = schemaInterface.isEmptyValue(dataNode.schema.field, dataNode.control.value) ? emptyText : schemaInterface.textValueForData(dataNode)) != null ? _ref : "";
|
|
554
|
+
const text = state.display != null ? state.display : (_ref = schemaInterface.isEmptyValue(dataNode.schema.field, dataNode.control.value) ? emptyText : schemaInterface.textValueForData(dataNode)) != null ? _ref : "";
|
|
554
555
|
const {
|
|
555
556
|
Div
|
|
556
557
|
} = renderer.html;
|
|
@@ -1989,6 +1990,7 @@ function createDefaultDataRenderer(options = {}) {
|
|
|
1989
1990
|
className: "@ " + rendererClass(p.className, displayOnlyClass),
|
|
1990
1991
|
children: /*#__PURE__*/jsx(DefaultDisplayOnly, {
|
|
1991
1992
|
dataNode: props.dataNode,
|
|
1993
|
+
state: props.state,
|
|
1992
1994
|
schemaInterface: props.dataContext.schemaInterface,
|
|
1993
1995
|
className: props.className,
|
|
1994
1996
|
textClass: props.textClass,
|