Closed alamenai closed 6 months ago
Hello. Unfortunately there isn't a good way to do this today, the browser does not distinguish between these two actions. As you can see in the documentation for the afterprint
event, all we know is that the print preview was closed; we don't know why it was closed.
If you don't mind an opinion on this: the user knows when they click Save or Cancel, and the user trusts the browser; you don't need to show a success toast for this.
Closing just because there is no bug here, but happy to keep discussing, I've always wanted to solve this, but I believe it will take a browser standards change to do it properly.
Thank you @MatthewHerbst . Yes, as you mentioned, 'The user trusts the Browser'.
Hello,
I have this code using
useReactToPrint
:I'm using Taost from Shadcn library and I used it to display success when the use save the PDF.
However, I want to display it only when the use click Save but not Cancel.
Thank you.