@festo-ui/react 11.2.0-dev.1082 → 11.2.0-dev.1088

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.
@@ -4,4 +4,4 @@ export interface UseControlledProps<T> {
4
4
  default: T;
5
5
  onChange?: (value: T) => void;
6
6
  }
7
- export declare function useControlled<T>({ controlled, default: defaultValue, onChange, }: UseControlledProps<T>): [T | undefined, Dispatch<SetStateAction<T>>];
7
+ export declare function useControlled<T>({ controlled, default: defaultValue, onChange, }: UseControlledProps<T>): [T, Dispatch<SetStateAction<T>>];
@@ -6,11 +6,11 @@ function useControlled({ controlled, default: defaultValue, onChange }) {
6
6
  const setValueIfUncontrolled = useCallback((newValue)=>{
7
7
  if (!isControlled) setValueState(newValue);
8
8
  const setter = newValue;
9
- const onChangeValue = 'function' == typeof newValue ? setter(controlled) : newValue;
9
+ const onChangeValue = 'function' == typeof newValue ? setter(value) : newValue;
10
10
  onChange?.(onChangeValue);
11
11
  }, [
12
12
  onChange,
13
- controlled
13
+ value
14
14
  ]);
15
15
  return [
16
16
  value,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@festo-ui/react",
3
- "version": "11.2.0-dev.1082",
3
+ "version": "11.2.0-dev.1088",
4
4
  "author": "Festo UI (styleguide@festo.com)",
5
5
  "copyright": "Copyright (c) 2025 Festo SE & Co. KG. All rights reserved.",
6
6
  "license": "apache-2.0",