Skip to content

[toast] Support partial data updates - #5464

Merged
atomiks merged 1 commit into
mui:masterfrom
chuganzy:toast-data
Aug 12, 2026
Merged

[toast] Support partial data updates#5464
atomiks merged 1 commit into
mui:masterfrom
chuganzy:toast-data

Conversation

@chuganzy

Copy link
Copy Markdown
Contributor

This PR proposes shallow-merging custom toast data when updating a toast.

Currently, the data passed to update replaces the existing data, so fields that should remain unchanged must be passed again:

toastManager.update(id, {
  data: {
    uploadId: '123',
    progress: 50,
  },
});

With this change, the same update can be written as:

toastManager.update(id, {
  data: {
    progress: 50,
  },
});

The existing uploadId is preserved, and data is typed as Partial<Data>, consistent with the other update options.

@chuganzy
chuganzy marked this pull request as ready for review August 11, 2026 06:16
@pkg-pr-new

pkg-pr-new Bot commented Aug 11, 2026

Copy link
Copy Markdown

commit: ae2ceab

@code-infra-dashboard

code-infra-dashboard Bot commented Aug 11, 2026

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 🔺+40B(+0.01%) 🔺+15B(+0.01%)

Details of bundle changes

Performance

Total duration: 1,129.08 ms -158.17 ms(-12.3%) | Renders: 76 (+0) | Paint: 1,783.68 ms -252.05 ms(-12.4%)

Test Duration Renders
Menu open (500 items) 67.77 ms ▼-20.52 ms(-23.2%) 11 (+0)
Combobox type — 500 items, narrows to ~11 (type "Row 25") 32.18 ms ▼-14.10 ms(-30.5%) 15 (+0)
Combobox open — 500 items 33.90 ms ▼-11.96 ms(-26.1%) 4 (+0)
Combobox type — 500 items, all stay mounted (type "Row ") 28.49 ms ▼-7.76 ms(-21.4%) 11 (+0)

11 tests within noise — details


Check out the code infra dashboard for more information about this PR.

@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for base-ui ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit ae2ceab
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a7abe0deb29f9000812b0b9
😎 Deploy Preview https://deploy-preview-5464--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@zannager zannager added the component: toast Changes related to the toast component. label Aug 11, 2026
@atomiks
atomiks merged commit 000646e into mui:master Aug 12, 2026
22 of 23 checks passed
@chuganzy
chuganzy deleted the toast-data branch August 12, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: toast Changes related to the toast component.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants