@react-typed-forms/schemas-html 5.0.0 → 5.0.1

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/lib/index.cjs CHANGED
@@ -262,8 +262,9 @@ function SelectDataRenderer(_ref) {
262
262
  props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
263
263
  var value = state.value,
264
264
  disabled = state.disabled;
265
- var _useState = react.useState(!required || value == null),
266
- showEmpty = _useState[0];
265
+ var showEmpty = react.useMemo(function () {
266
+ return !required || value == null;
267
+ }, [required, value]);
267
268
  var optionStringMap = react.useMemo(function () {
268
269
  return Object.fromEntries(options.map(function (x) {
269
270
  return [convert(x.value), x.value];
@@ -2225,7 +2226,7 @@ function HtmlCheckButtons(props) {
2225
2226
  disabled: disabled,
2226
2227
  checked: checked,
2227
2228
  onChange: function onChange(x) {
2228
- !readonly && setChecked(control, o, x.target.checked);
2229
+ !(readonly || disabled) && setChecked(control, o, x.target.checked);
2229
2230
  }
2230
2231
  }), /*#__PURE__*/jsxRuntime.jsx("label", {
2231
2232
  className: classes.labelClass,