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.mjs CHANGED
@@ -1200,7 +1200,7 @@ function useForm(options) {
1200
1200
  setErrors({});
1201
1201
  }, [defaultValues]);
1202
1202
  const isDirty = useMemo(
1203
- () => Object.keys(defaultValues).some((key) => defaultValues[key] !== values[key]),
1203
+ () => Object.keys(defaultValues).some((key) => JSON.stringify(defaultValues[key]) !== JSON.stringify(values[key])),
1204
1204
  [defaultValues, values]
1205
1205
  );
1206
1206
  const isValid = useMemo(() => {
@@ -2192,8 +2192,8 @@ var ButtonComponent = function Button(buttonProps) {
2192
2192
  isLoading: isLoadingElement,
2193
2193
  withNoBorder: theme2.styles.borderWidth === 0,
2194
2194
  disabled,
2195
- to: href,
2196
- href,
2195
+ to: !disabled && !isLoadingElement ? href : void 0,
2196
+ href: !disabled && !isLoadingElement ? href : void 0,
2197
2197
  download,
2198
2198
  target,
2199
2199
  type: isSubmit && !isLoadingElement ? "submit" : "button",