1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2025-03-12 15:15:54 +00:00
Radarr/frontend/src/Utilities/Table/getSelectedIds.ts
2023-05-06 21:33:19 -05:00

18 lines
374 B
TypeScript

import { reduce } from 'lodash';
import { SelectedState } from 'Helpers/Hooks/useSelectState';
function getSelectedIds(selectedState: SelectedState): number[] {
return reduce(
selectedState,
(result: number[], value, id) => {
if (value) {
result.push(parseInt(id));
}
return result;
},
[]
);
}
export default getSelectedIds;