TWebToast problem


I have a problem when I close the toast via cross, at design I added toast item (index 0) and when I show it and close via cross the item toast is deleted ... and when I try show it again I get an error "List index 0 out of bounds".
In atachment web core project, to reproduce problem: (778.6 KB)

  1. Click "Show toast" button
  2. Close toast via cross
  3. Click "Show toast" button

If you close the item by clicking the cross, the item is destroyed automatically, so it is expected it is removed from the collection and cannot be redisplayed.
As such, this behavior is by design.

Ok ... can I get around this behavior?

In my project I added 3 toast items for:

  1. Toast Error
  2. Toast Info
  3. Toast Warning
    in design mode and I use these (by change html body) for different cases. Due to this I don't have to create toast items dynamically.

I know that one of the solution is to hide the cross ... but this is not good a solution for me.

It is by design. Closing removes the toast.
If you do not want this, the component will need to be extended.
Add this as a feature request: