@bluemarble/bm-components 1.10.3 → 1.10.5
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 +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3413,14 +3413,14 @@ function FormikAutocompleteLegacy(_a) {
|
|
|
3413
3413
|
const [_a2, ..._b2] = useField2({
|
|
3414
3414
|
name: props.name
|
|
3415
3415
|
}), _c = _a2, { value } = _c, field = __objRest(_c, ["value"]), [meta, { setValue }] = _b2;
|
|
3416
|
-
const defaultOption =
|
|
3416
|
+
const [defaultOption] = useState3(() => {
|
|
3417
3417
|
const key = option == null ? void 0 : option.key;
|
|
3418
3418
|
if (key)
|
|
3419
3419
|
return props.options.find((option2) => option2[key] === value);
|
|
3420
3420
|
return props.options.find(
|
|
3421
3421
|
(option2) => Object.values(option2)[0] === value
|
|
3422
3422
|
);
|
|
3423
|
-
}
|
|
3423
|
+
});
|
|
3424
3424
|
const onChange = (_, newValue) => {
|
|
3425
3425
|
const value2 = option == null ? void 0 : option.value;
|
|
3426
3426
|
if (getOptionValue) {
|
|
@@ -3463,7 +3463,7 @@ function FormikAutocompleteLegacy(_a) {
|
|
|
3463
3463
|
autoFocus: props.autoFocus
|
|
3464
3464
|
}), props.textFieldProps)
|
|
3465
3465
|
),
|
|
3466
|
-
|
|
3466
|
+
defaultValue: defaultOption || null,
|
|
3467
3467
|
onChange,
|
|
3468
3468
|
isOptionEqualToValue
|
|
3469
3469
|
}, props)
|
|
@@ -4838,13 +4838,13 @@ function useGrid({
|
|
|
4838
4838
|
},
|
|
4839
4839
|
[sortedBy]
|
|
4840
4840
|
);
|
|
4841
|
-
const onPageChange =
|
|
4841
|
+
const onPageChange = (pageNumber) => {
|
|
4842
4842
|
if (pageNumber < 0)
|
|
4843
4843
|
return;
|
|
4844
4844
|
if (pageNumber > totalNumberOfPages)
|
|
4845
4845
|
return;
|
|
4846
4846
|
setCurrentPage(pageNumber);
|
|
4847
|
-
}
|
|
4847
|
+
};
|
|
4848
4848
|
const onChangeRowsPerPage = useCallback5(
|
|
4849
4849
|
(rows) => {
|
|
4850
4850
|
let totalNumberOfPages2 = Math.round(filteredData.length / rows) - 1;
|