useItemCancelListener
Packageβ
Installationβ
- npm
- Yarn
- pnpm
npm install @rpldy/uploady
yarn add @rpldy/uploady
pnpm add @rpldy/uploady
Detailsβ
type useItemCancelListener = ItemEventHook;
- See: ItemEventHook
- See: BatchItem Entity
note
Event Hook - ITEM-CANCEL
Called in case item was cancelled from ITEM_START event handler
info
This event can be scoped to a specific item by passing the item id as a second parameter
Exampleβ
import { useItemCancelListener } from "@rpldy/uploady";
const MyComponent = () => {
useItemCancelListener((item, options) => {
console.log(`item ${item.id} was cancelled`);
});
//...
};