@teselagen/ui 0.7.16 → 0.7.17
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/index.cjs.js +3 -4
- package/index.es.js +3 -4
- package/package.json +1 -1
- package/src/FormComponents/index.js +3 -6
package/index.cjs.js
CHANGED
|
@@ -31878,7 +31878,7 @@ const AbstractInput = /* @__PURE__ */ __name(({
|
|
|
31878
31878
|
disabled,
|
|
31879
31879
|
fileLimit,
|
|
31880
31880
|
inlineLabel,
|
|
31881
|
-
input: { name: name2
|
|
31881
|
+
input: { name: name2 },
|
|
31882
31882
|
intent,
|
|
31883
31883
|
isLabelTooltip,
|
|
31884
31884
|
isLoadingDefaultValue,
|
|
@@ -31886,7 +31886,7 @@ const AbstractInput = /* @__PURE__ */ __name(({
|
|
|
31886
31886
|
label,
|
|
31887
31887
|
labelStyle,
|
|
31888
31888
|
leftEl,
|
|
31889
|
-
meta: { form, touched, error, warning: warning2 },
|
|
31889
|
+
meta: { form, touched, error, warning: warning2, initial },
|
|
31890
31890
|
noFillField,
|
|
31891
31891
|
noMarginBottom,
|
|
31892
31892
|
noOuterLabel,
|
|
@@ -31903,10 +31903,9 @@ const AbstractInput = /* @__PURE__ */ __name(({
|
|
|
31903
31903
|
tooltipProps
|
|
31904
31904
|
}) => {
|
|
31905
31905
|
const dispatch = reactRedux.useDispatch();
|
|
31906
|
-
const initalValuePassed = React$1.useRef(value);
|
|
31907
31906
|
const onDefaultValChanged = useStableReference(_onDefaultValChanged);
|
|
31908
31907
|
const onFieldSubmit = useStableReference(_onFieldSubmit);
|
|
31909
|
-
const doesNotHaveInitialValue = !
|
|
31908
|
+
const doesNotHaveInitialValue = !initial;
|
|
31910
31909
|
React$1.useEffect(() => {
|
|
31911
31910
|
if (defaultValue2 !== void 0 && doesNotHaveInitialValue) {
|
|
31912
31911
|
dispatch(reduxForm.change(form, name2, defaultValue2));
|
package/index.es.js
CHANGED
|
@@ -31860,7 +31860,7 @@ const AbstractInput = /* @__PURE__ */ __name(({
|
|
|
31860
31860
|
disabled,
|
|
31861
31861
|
fileLimit,
|
|
31862
31862
|
inlineLabel,
|
|
31863
|
-
input: { name: name2
|
|
31863
|
+
input: { name: name2 },
|
|
31864
31864
|
intent,
|
|
31865
31865
|
isLabelTooltip,
|
|
31866
31866
|
isLoadingDefaultValue,
|
|
@@ -31868,7 +31868,7 @@ const AbstractInput = /* @__PURE__ */ __name(({
|
|
|
31868
31868
|
label,
|
|
31869
31869
|
labelStyle,
|
|
31870
31870
|
leftEl,
|
|
31871
|
-
meta: { form, touched, error, warning: warning2 },
|
|
31871
|
+
meta: { form, touched, error, warning: warning2, initial },
|
|
31872
31872
|
noFillField,
|
|
31873
31873
|
noMarginBottom,
|
|
31874
31874
|
noOuterLabel,
|
|
@@ -31885,10 +31885,9 @@ const AbstractInput = /* @__PURE__ */ __name(({
|
|
|
31885
31885
|
tooltipProps
|
|
31886
31886
|
}) => {
|
|
31887
31887
|
const dispatch = useDispatch();
|
|
31888
|
-
const initalValuePassed = useRef(value);
|
|
31889
31888
|
const onDefaultValChanged = useStableReference(_onDefaultValChanged);
|
|
31890
31889
|
const onFieldSubmit = useStableReference(_onFieldSubmit);
|
|
31891
|
-
const doesNotHaveInitialValue = !
|
|
31890
|
+
const doesNotHaveInitialValue = !initial;
|
|
31892
31891
|
useEffect(() => {
|
|
31893
31892
|
if (defaultValue2 !== void 0 && doesNotHaveInitialValue) {
|
|
31894
31893
|
dispatch(change(form, name2, defaultValue2));
|
package/package.json
CHANGED
|
@@ -7,7 +7,6 @@ import React, {
|
|
|
7
7
|
useContext,
|
|
8
8
|
useEffect,
|
|
9
9
|
useMemo,
|
|
10
|
-
useRef,
|
|
11
10
|
useState
|
|
12
11
|
} from "react";
|
|
13
12
|
import { Field, change } from "redux-form";
|
|
@@ -137,7 +136,7 @@ const AbstractInput = ({
|
|
|
137
136
|
disabled,
|
|
138
137
|
fileLimit,
|
|
139
138
|
inlineLabel,
|
|
140
|
-
input: { name
|
|
139
|
+
input: { name },
|
|
141
140
|
intent,
|
|
142
141
|
isLabelTooltip,
|
|
143
142
|
isLoadingDefaultValue,
|
|
@@ -145,7 +144,7 @@ const AbstractInput = ({
|
|
|
145
144
|
label,
|
|
146
145
|
labelStyle,
|
|
147
146
|
leftEl,
|
|
148
|
-
meta: { form, touched, error, warning },
|
|
147
|
+
meta: { form, touched, error, warning, initial },
|
|
149
148
|
noFillField,
|
|
150
149
|
noMarginBottom,
|
|
151
150
|
noOuterLabel,
|
|
@@ -162,11 +161,9 @@ const AbstractInput = ({
|
|
|
162
161
|
tooltipProps
|
|
163
162
|
}) => {
|
|
164
163
|
const dispatch = useDispatch();
|
|
165
|
-
const initalValuePassed = useRef(value);
|
|
166
164
|
const onDefaultValChanged = useStableReference(_onDefaultValChanged);
|
|
167
165
|
const onFieldSubmit = useStableReference(_onFieldSubmit);
|
|
168
|
-
const doesNotHaveInitialValue =
|
|
169
|
-
!isLoadingDefaultValue && !initalValuePassed.current;
|
|
166
|
+
const doesNotHaveInitialValue = !initial;
|
|
170
167
|
// This only takes care that the default Value is changed when it is changed in the parent component
|
|
171
168
|
useEffect(() => {
|
|
172
169
|
//if the input already has an initial value being passed to it, we don't want to override it with the default value
|