Skip to content

Commit 1f3688e

Browse files
committed
root-always-baseline
1 parent 3cef191 commit 1f3688e

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

packages/rn-declarative/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/rn-declarative/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rn-declarative",
3-
"version": "0.0.47",
3+
"version": "0.0.48",
44
"description": "A lighter version of the react-declarative which exports the <One /> component and dependencies only and as such makes the library slightly faster and smaller. Unlike react-declarative, it doesn't provide any additional overhead like state management. For a note, that library should be used when you want to use <One /> forms in existing app",
55
"private": false,
66
"author": {

packages/rn-declarative/src/components/One/One.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const DEFAULT_ONLOADSTART = () => null;
2929
const DEFAULT_ONLOADEND = () => null;
3030
const DEFAULT_READTRANSFORM = (value: Value) => value;
3131
const DEFAULT_WRITETRANSFORM = (value: Value) => value;
32+
const DEFAULT_ROOT_BASELINE = () => true;
3233

3334
/**
3435
* Creates a json template engine called `One` with the given props.
@@ -61,7 +62,7 @@ export const One = <Data extends IAnything = IAnything, Payload = IAnything, Fie
6162
createField = createFieldInternal,
6263
createLayout = createLayoutInternal,
6364
isBaseline = isBaselineInternal,
64-
isBaselineForRoot = isBaselineInternal,
65+
isBaselineForRoot = DEFAULT_ROOT_BASELINE,
6566
apiRef,
6667
changeSubject,
6768
reloadSubject,

0 commit comments

Comments
 (0)