MDK Logo
UI Kitreact-devkitHooks

useUpdateExistedActions

Mutation hook that updates only the changed fields of an existing action record. Removes tags from existing pending submissions if those tags belong to the n…

Mutation hook that updates only the changed fields of an existing action record. Removes tags from existing pending submissions if those tags belong to the newly selected devices; if the resulting tag list is empty, the submission itself is removed. This avoids duplicate pending actions for the same device.

import { useUpdateExistedActions } from "@tetherto/mdk-react-devkit";

Signature

() => { updateExistedActions: ({ actionType, pendingSubmissions, selectedDevices, }: UpdateExistedActionsParams) => void; }
Package@tetherto/mdk-react-devkit