x-ui-design 0.5.83 → 0.5.84
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/dist/index.esm.js +7 -15
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -15
- package/dist/index.js.map +1 -1
- package/lib/components/Form/Item/Item.tsx +7 -6
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -974,17 +974,6 @@ function flattenChildren(children) {
|
|
|
974
974
|
var css_248z$l = ".xUi-form-item{display:flex;position:relative}.xUi-form-item.noStyle{display:inline-flex;margin-bottom:0}.xUi-form-item-label{align-items:center;color:var(--xui-text-color);display:flex;font-size:var(--xui-font-size-md);font-weight:500;line-height:20px;margin-bottom:4px}.xUi-form-item-error{color:var(--xui-error-color);display:block;font-size:var(--xui-font-size-xs);line-height:16px;margin-bottom:8px;margin-top:4px;min-height:16px;position:relative;right:0;text-align:end;user-select:none}.xUi-form-item-required{color:var(--xui-error-color);display:inline-block;font-size:var(--xui-font-size-md);line-height:1;margin-left:4px;margin-right:4px}.xUi-form-item.horizontal{align-items:center;flex-direction:row;gap:4px}.xUi-form-item.vertical{align-self:flex-start;flex-direction:column}.xUi-form-item .xUi-input-container{width:-webkit-fill-available}";
|
|
975
975
|
styleInject(css_248z$l);
|
|
976
976
|
|
|
977
|
-
const debounce = (func, delay) => {
|
|
978
|
-
let timeoutId = null;
|
|
979
|
-
return (...args) => {
|
|
980
|
-
if (timeoutId) {
|
|
981
|
-
clearTimeout(timeoutId);
|
|
982
|
-
}
|
|
983
|
-
timeoutId = setTimeout(() => {
|
|
984
|
-
func(...args);
|
|
985
|
-
}, delay);
|
|
986
|
-
};
|
|
987
|
-
};
|
|
988
977
|
const FormItem$1 = ({
|
|
989
978
|
prefixCls = prefixClsFormItem,
|
|
990
979
|
name,
|
|
@@ -1133,9 +1122,11 @@ const FormItemChildComponent = ({
|
|
|
1133
1122
|
const {
|
|
1134
1123
|
getFieldsValue
|
|
1135
1124
|
} = formContext || {};
|
|
1136
|
-
const debouncedSetFieldValue = useRef(
|
|
1137
|
-
|
|
1138
|
-
|
|
1125
|
+
// const debouncedSetFieldValue = useRef(
|
|
1126
|
+
// debounce((name: string, value: any) => {
|
|
1127
|
+
// setFieldValue(name, value, undefined, undefined, true);
|
|
1128
|
+
// }, 20)
|
|
1129
|
+
// ).current;
|
|
1139
1130
|
const handleChange = (e, option) => {
|
|
1140
1131
|
let rawValue = e?.target ? e.target.value : e;
|
|
1141
1132
|
if (normalize) {
|
|
@@ -1152,7 +1143,8 @@ const FormItemChildComponent = ({
|
|
|
1152
1143
|
return;
|
|
1153
1144
|
}
|
|
1154
1145
|
}
|
|
1155
|
-
debouncedSetFieldValue(name, rawValue);
|
|
1146
|
+
// debouncedSetFieldValue(name, rawValue);
|
|
1147
|
+
setFieldValue(name, rawValue, undefined, undefined, true);
|
|
1156
1148
|
onChange?.(e, option);
|
|
1157
1149
|
};
|
|
1158
1150
|
const injectPropsIntoFinalLeaf = child => {
|