@rolster/react-components 18.21.41 → 18.21.42

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/es/index.js CHANGED
@@ -1552,7 +1552,7 @@ function RlsCheckBoxControl({ formControl, disabled, identifier, rlsTheme }) {
1552
1552
  return (jsxRuntimeExports.jsx(RlsCheckBox, { identifier: identifier, checked: !!formControl.value, disabled: disabled, onClick: onClick, rlsTheme: rlsTheme }));
1553
1553
  }
1554
1554
 
1555
- function RlsInput({ children, decimals, disabled, formControl, identifier, onEnter, onKeyDown, onKeyUp, onValue, placeholder, readOnly, type, value }) {
1555
+ function RlsInput({ children, decimals, disabled, formControl, identifier, onBlur, onEnter, onFocus, onKeyDown, onKeyUp, onValue, placeholder, readOnly, type, value }) {
1556
1556
  const valueInitial = formControl?.value ?? value ? String(value) : '';
1557
1557
  const [valueInput, setValueInput] = useState(valueInitial);
1558
1558
  const [focused, setFocused] = useState(false);
@@ -1584,11 +1584,13 @@ function RlsInput({ children, decimals, disabled, formControl, identifier, onEnt
1584
1584
  const _onFocus = useCallback(() => {
1585
1585
  formControl?.focus();
1586
1586
  setFocused(() => true);
1587
- }, [formControl]);
1587
+ onFocus && onFocus();
1588
+ }, [formControl, onFocus]);
1588
1589
  const _onBlur = useCallback(() => {
1589
1590
  formControl?.blur();
1590
1591
  setFocused(() => false);
1591
- }, [formControl]);
1592
+ onBlur && onBlur();
1593
+ }, [formControl, onBlur]);
1592
1594
  const className = useMemo(() => {
1593
1595
  return renderClassStatus('rls-input', {
1594
1596
  disabled: formControl?.disabled || disabled,