[FEAT] RecordAction destroy many record (#9991)
# Introduction Added the `RecordAction` destroy multiple record ## Repro Select multiples `deletedRecords`, you should be able to see the `Destroy` pinned CTA ( iso short label with the destroy one ), open control panel and fin new CTA `Permanently delete records` https://github.com/user-attachments/assets/31ee8738-9d61-4dec-9a1f-41bb6785e018 ## TODO - [ ] Gain granularity within tests to assert the action should be registered only when filtering by deleted ## Conclusion Closes https://github.com/twentyhq/core-team-issues/issues/110
This commit is contained in:
@ -87,9 +87,12 @@ export const usePersistViewGroupRecords = () => {
|
||||
async (viewGroupsToDelete: ViewGroup[]) => {
|
||||
if (!viewGroupsToDelete.length) return;
|
||||
|
||||
return destroyManyRecords(
|
||||
viewGroupsToDelete.map((viewGroup) => viewGroup.id),
|
||||
const recordIdsToDestroy = viewGroupsToDelete.map(
|
||||
(viewGroup) => viewGroup.id,
|
||||
);
|
||||
return destroyManyRecords({
|
||||
recordIdsToDestroy,
|
||||
});
|
||||
},
|
||||
[destroyManyRecords],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user