Changes a [toast notification](../../components/toast.md) that is still on screen. Takes the same keys as [show](./show.md), and `id` is required. The message and title are replaced, so pass both again if both should stay. Updating a toast that has already closed does nothing.

Updating a loading toast without `"loading": True` stops the spinner and gives it back its close button and auto-close timer. Pass `"loading": True` again to change the message while keeping the spinner, for example to show progress.

When updating from a Gateway script or a background thread, pass the `sessionId` and `pageId` the toast was shown on.

---

### Parameters

**paramsDict** `Dictionary`<br />
<table class='dictionaryKeyTable'>
 <tbody>
 <tr><td> - id</td><td>String</td><td>Required. The id of the toast to change, as returned by `show`.</td></tr>
 <tr><td> - message</td><td>String</td><td>The new text, up to 1000 characters.</td></tr>
 <tr><td> - title</td><td>String</td><td>The new heading, up to 1000 characters.</td></tr>
 <tr><td> - type</td><td>String</td><td>`info`, `success`, `warning`, `error` or `default`.</td></tr>
 <tr><td> - position</td><td>String</td><td>`top-left`, `top-center`, `top-right`, `bottom-left`, `bottom-center` or `bottom-right`.</td></tr>
 <tr><td> - animate</td><td>String</td><td>`bounce`, `slide`, `zoom` or `flip`.</td></tr>
 <tr><td> - autoClose</td><td>Integer</td><td>Milliseconds before the toast closes. `0` keeps it open until it is dismissed.</td></tr>
 <tr><td> - closeButton</td><td>Boolean</td><td>Show the close button.</td></tr>
 <tr><td> - pauseOnHover</td><td>Boolean</td><td>Pause the auto-close timer while the pointer is over the toast.</td></tr>
 <tr><td> - draggable</td><td>Boolean</td><td>Allow the toast to be swiped away.</td></tr>
 <tr><td> - loading</td><td>Boolean</td><td>Keep the spinner showing.</td></tr>
 <tr><td> - sessionId</td><td>String</td><td>The session the toast is in. Required from Gateway scripts.</td></tr>
 <tr><td> - pageId</td><td>String</td><td>The page the toast is on. Required from Gateway scripts.</td></tr>
 </tbody>
</table>

---

### Returns

---

### Example

```python
toastId = system.kanoa.toast.show({"message": "Releasing lot 123...", "loading": True})
try:
    releaseLot(123)
    system.kanoa.toast.update({"id": toastId, "message": "Lot 123 released", "type": "success"})
except:
    system.kanoa.toast.update({"id": toastId, "message": "Release failed", "type": "error"})
    raise

# From a background thread, pass the session and page ids read before it started
sessionId, pageId = self.session.props.id, self.page.props.pageId
toastId = system.kanoa.toast.show({"message": "Working...", "loading": True})

def work():
    # ... long task ...
    system.kanoa.toast.update({"id": toastId, "message": "Done", "type": "success",
                               "sessionId": sessionId, "pageId": pageId})

system.util.invokeAsynchronous(work)
```
