react-better-html 1.1.249 → 1.1.250

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
@@ -1271,7 +1271,7 @@ function useForm(options) {
1271
1271
  setErrors({});
1272
1272
  }, [defaultValues]);
1273
1273
  const isDirty = (0, import_react.useMemo)(
1274
- () => Object.keys(defaultValues).some((key) => defaultValues[key] !== values[key]),
1274
+ () => Object.keys(defaultValues).some((key) => JSON.stringify(defaultValues[key]) !== JSON.stringify(values[key])),
1275
1275
  [defaultValues, values]
1276
1276
  );
1277
1277
  const isValid = (0, import_react.useMemo)(() => {
@@ -2259,8 +2259,8 @@ var ButtonComponent = function Button(buttonProps) {
2259
2259
  isLoading: isLoadingElement,
2260
2260
  withNoBorder: theme2.styles.borderWidth === 0,
2261
2261
  disabled,
2262
- to: href,
2263
- href,
2262
+ to: !disabled && !isLoadingElement ? href : void 0,
2263
+ href: !disabled && !isLoadingElement ? href : void 0,
2264
2264
  download,
2265
2265
  target,
2266
2266
  type: isSubmit && !isLoadingElement ? "submit" : "button",