@seeqdev/qomponents 0.0.155-react-19-v7 → 0.0.155-react-19-v8

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
@@ -4666,6 +4666,13 @@ const TextField = React.forwardRef((props, ref) => {
4666
4666
  ref.current = receivedRef;
4667
4667
  internalRef.current = receivedRef;
4668
4668
  };
4669
+ React.useEffect(() => {
4670
+ if (autoFocus) {
4671
+ setTimeout(() => {
4672
+ internalRef.current?.focus();
4673
+ }, 0);
4674
+ }
4675
+ }, []);
4669
4676
  React.useEffect(() => {
4670
4677
  const input = internalRef.current;
4671
4678
  if (input && type !== 'number' && type !== 'email')
@@ -4705,7 +4712,7 @@ const TextField = React.forwardRef((props, ref) => {
4705
4712
  if (minLength)
4706
4713
  inputLenghtProp.minLength = minLength;
4707
4714
  return (React.createElement(React.Fragment, null,
4708
- React.createElement("input", { ref: setAllRefs, "data-testid": testId, name: name, id: id, type: type, value: value, className: appliedClasses, placeholder: placeholder, disabled: disabled, readOnly: readonly, autoComplete: autoComplete, onChange: handleChange, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, onKeyUp: onKeyUp, step: step, required: required, autoFocus: autoFocus, min: min, max: max, ...inputLenghtProp, ...inputProp, ...tooltipData }),
4715
+ React.createElement("input", { ref: setAllRefs, "data-testid": testId, name: name, id: id, type: type, value: value, className: appliedClasses, placeholder: placeholder, disabled: disabled, readOnly: readonly, autoComplete: autoComplete, onChange: handleChange, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, onKeyUp: onKeyUp, step: step, required: required, min: min, max: max, ...inputLenghtProp, ...inputProp, ...tooltipData }),
4709
4716
  errorText && showError && React.createElement("div", { className: "tw-text-sq-danger-color tw-text-xs tw-mt-1" }, errorText)));
4710
4717
  });
4711
4718