x-ui-design 0.2.87 → 0.2.89

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.js CHANGED
@@ -739,7 +739,7 @@ const useForm = (initialValues = {}, onFieldsChange, onValuesChange) => {
739
739
  const results = await Promise.all(fieldsToValidate.map(name => validateField(name)));
740
740
  return results.every(valid => valid);
741
741
  }
742
- function resetFields(nameList) {
742
+ function resetFields(nameList, showError = true) {
743
743
  if (nameList?.length) {
744
744
  nameList.forEach(name => {
745
745
  formRef.current[name] = initialValues[name];
@@ -749,13 +749,13 @@ const useForm = (initialValues = {}, onFieldsChange, onValuesChange) => {
749
749
  ...prev,
750
750
  [name]: []
751
751
  }));
752
- setFieldValue(name, initialValues[name], undefined, true);
752
+ setFieldValue(name, initialValues[name], undefined, showError);
753
753
  });
754
754
  } else {
755
755
  touchedFieldsRef.current.clear();
756
756
  warningsRef.current = {};
757
757
  Object.keys(formRef.current).forEach(name => {
758
- setFieldValue(name, initialValues[name], undefined, true);
758
+ setFieldValue(name, initialValues[name], undefined, showError);
759
759
  });
760
760
  }
761
761
  formSubscribers.current.forEach(callback => callback(getFieldsValue()));
@@ -2923,7 +2923,7 @@ const SelectComponent = /*#__PURE__*/React$1.forwardRef(({
2923
2923
  searchValue = '',
2924
2924
  autoClearSearchValue = true,
2925
2925
  filterOption = true,
2926
- optionFilterProp = 'value',
2926
+ optionFilterProp,
2927
2927
  children,
2928
2928
  options = [],
2929
2929
  listHeight = LIST_HEIGHT,