0

I have a LWC that shows a table of records with the classic 'actions' arrow. Among the available actions there is 'delete'. Which, when pressed, deletes the record and shows a successful toast. I wonder if it is possible to simulate the standard 'undo' that appears on toast when deleting a record from a standard list view. Searching a bit I found the 'messageData' parameter, but it expects an url, I would like to be able to call a js function that restore the previously deleted record... Is it possible?

1
  • afaik it is not possible to have button in standard toast event
    – Damecek
    Feb 10, 2023 at 9:05

1 Answer 1

0

That link is for standard record deletes from the UI, not from LWC. You need to build your own undo functionality by using a link and making it do something.

You have to use SLDS documentation need to build a custom toast message.

SLDS link : https://www.lightningdesignsystem.com/components/toast/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .