Renamed nullable utils into isDefined and isUndefinedOrNull (#4402)
* Renamed nullable utils into isDefined and isUndefinedOrNull
This commit is contained in:
@ -4,7 +4,7 @@ import { useSelectableListHotKeys } from '@/ui/layout/selectable-list/hooks/inte
|
||||
import { useSelectableList } from '@/ui/layout/selectable-list/hooks/useSelectableList';
|
||||
import { SelectableListScope } from '@/ui/layout/selectable-list/scopes/SelectableListScope';
|
||||
import { arrayToChunks } from '~/utils/array/arrayToChunks';
|
||||
import { isNonNullable } from '~/utils/isNonNullable';
|
||||
import { isDefined } from '~/utils/isDefined';
|
||||
|
||||
type SelectableListProps = {
|
||||
children: ReactNode;
|
||||
@ -40,11 +40,11 @@ export const SelectableList = ({
|
||||
);
|
||||
}
|
||||
|
||||
if (isNonNullable(selectableItemIdMatrix)) {
|
||||
if (isDefined(selectableItemIdMatrix)) {
|
||||
setSelectableItemIds(selectableItemIdMatrix);
|
||||
}
|
||||
|
||||
if (isNonNullable(selectableItemIdArray)) {
|
||||
if (isDefined(selectableItemIdArray)) {
|
||||
setSelectableItemIds(arrayToChunks(selectableItemIdArray, 1));
|
||||
}
|
||||
}, [selectableItemIdArray, selectableItemIdMatrix, setSelectableItemIds]);
|
||||
|
||||
Reference in New Issue
Block a user