Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Promise type definition from beforeRemove event listener #10244

Open
marciogurka opened this issue Oct 22, 2024 · 0 comments
Open

Remove Promise type definition from beforeRemove event listener #10244

marciogurka opened this issue Oct 22, 2024 · 0 comments
Labels
bug Something isn't working forum Issues from forum large-account Reported by large customer typescript

Comments

@marciogurka
Copy link

Forum post

On the definition of the beforeRemove listener, we have the Promise<boolean> as a possible return, but that's not correct, so we need to fix that.
https://bryntum.com/products/grid/docs/api/Core/data/AjaxStore#event-beforeRemove

/**
     * Fired before records are removed from this store by the [remove](https://bryntum.com/products/scheduler/docs/api/Core/data/mixin/StoreCRUD#function-remove) or [removeAll](#Core/data/mixin/StoreCRUD#function-removeAll).
     * Also fired when removing a child record in a tree store using [removeChild](https://bryntum.com/products/scheduler/docs/api/Core/data/mixin/TreeNode#function-removeChild).
     * The remove may be vetoed by returning `false` from a handler.
     * @param {object} event Event object
     * @param {Store} event.source This Store
     * @param {Model[]} event.records The records which are to be removed.
     * @param {Model} event.parent The record from which children are being removed when using a tree store. Only provided when removing a single node.
     * @param {boolean} event.isMove This flag is `true` if the child node is being removed by [appendChild](https://bryntum.com/products/scheduler/docs/api/Core/data/mixin/TreeNode#function-appendChild) to be moved *within the same tree*.
     * @param {boolean} event.removingAll This flag is `true` if the operation is removing the store's entire data set.
     */
    beforeRemove?: ((event: { source: Store, records: Model[], parent: Model, isMove: boolean, removingAll: boolean }) => Promise<boolean>|boolean|void)|string
    ```
@marciogurka marciogurka added bug Something isn't working forum Issues from forum typescript large-account Reported by large customer labels Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forum Issues from forum large-account Reported by large customer typescript
Projects
None yet
Development

No branches or pull requests

1 participant