@northlight/ui 2.33.1 → 2.33.2
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/northlight.d.ts +4 -0
- package/dist/es/northlight.js +5 -3
- package/dist/es/northlight.js.map +1 -1
- package/dist/umd/northlight.cjs +5 -3
- package/dist/umd/northlight.cjs.map +1 -1
- package/dist/umd/northlight.min.cjs +3 -3
- package/dist/umd/northlight.min.cjs.map +1 -1
- package/package.json +2 -2
package/dist/es/northlight.d.ts
CHANGED
|
@@ -146,6 +146,10 @@ interface SelectProps<T, K extends boolean> extends Omit<Props<T, K, GroupBase<T
|
|
|
146
146
|
customOption?: ((option: T) => JSX.Element) | null;
|
|
147
147
|
isMulti?: K;
|
|
148
148
|
ref?: Ref<SelectInstance<T, K, GroupBase<T>>>;
|
|
149
|
+
/** Should return a unique key that is tracked so when the key changes
|
|
150
|
+
the sub-components for react-select will be recomputed/rerendered
|
|
151
|
+
*/
|
|
152
|
+
generateComponentsUpdateKey?: () => unknown;
|
|
149
153
|
}
|
|
150
154
|
type SelectFieldProps<T, K extends boolean = false> = SelectProps<T, K> & Omit<InputFieldProps, 'isMulti'> & {
|
|
151
155
|
direction?: StackDirection;
|
package/dist/es/northlight.js
CHANGED
|
@@ -12604,7 +12604,8 @@ const Select = forwardRef$1((_a, ref) => {
|
|
|
12604
12604
|
isClearable = false,
|
|
12605
12605
|
value,
|
|
12606
12606
|
icon,
|
|
12607
|
-
components
|
|
12607
|
+
components,
|
|
12608
|
+
generateComponentsUpdateKey = always(0)
|
|
12608
12609
|
} = _b, rest = __objRest$n(_b, [
|
|
12609
12610
|
"options",
|
|
12610
12611
|
"isMulti",
|
|
@@ -12619,7 +12620,8 @@ const Select = forwardRef$1((_a, ref) => {
|
|
|
12619
12620
|
"isClearable",
|
|
12620
12621
|
"value",
|
|
12621
12622
|
"icon",
|
|
12622
|
-
"components"
|
|
12623
|
+
"components",
|
|
12624
|
+
"generateComponentsUpdateKey"
|
|
12623
12625
|
]);
|
|
12624
12626
|
const handleChange = useSelectCallbacks({
|
|
12625
12627
|
onChange,
|
|
@@ -12630,7 +12632,7 @@ const Select = forwardRef$1((_a, ref) => {
|
|
|
12630
12632
|
});
|
|
12631
12633
|
const customComponents = useMemo(
|
|
12632
12634
|
() => getComponents(components),
|
|
12633
|
-
[]
|
|
12635
|
+
[generateComponentsUpdateKey()]
|
|
12634
12636
|
);
|
|
12635
12637
|
const prevOptions = useRef(
|
|
12636
12638
|
options
|