base-ui icon indicating copy to clipboard operation
base-ui copied to clipboard

[toggle-group][toggle] type safety

Open michaelhazan opened this issue 1 month ago • 4 comments

Closes #3142 .

[!NOTE] Originally this was meant to only introduce generic types to the ToggleGroup, but i realized while working on this that Toggle too had to be changed to handle a generic value.

michaelhazan avatar Nov 07 '25 23:11 michaelhazan

vite-css-base-ui-example

pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/react@3173
pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/utils@3173

commit: 30892c5

pkg-pr-new[bot] avatar Nov 07 '25 23:11 pkg-pr-new[bot]

Bundle size report

Bundle Parsed size Gzip size
@base-ui-components/react ▼-1B(0.00%) 🔺+7B(+0.01%)

Details of bundle changes


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

mui-bot avatar Nov 07 '25 23:11 mui-bot

Deploy Preview for base-ui ready!

Name Link
Latest commit 30892c5334040d40457b09a7dc80f7b90c257d3f
Latest deploy log https://app.netlify.com/projects/base-ui/deploys/692723aeb75ef2000821d719
Deploy Preview https://deploy-preview-3173--base-ui.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

netlify[bot] avatar Nov 07 '25 23:11 netlify[bot]

it seems like this is failing over something i have not affected...

would appreciate help

michaelhazan avatar Nov 24 '25 15:11 michaelhazan

@michaelhazan My bad, I remembered we actually do this intentionally:

the value prop and onValueChange don't depend on if the multiple is true or not causing the component to always expect and array

Accordion is the same and the value is always an array

mj12albert avatar Nov 26 '25 16:11 mj12albert

@michaelhazan My bad, I remembered we actually do this intentionally:

the value prop and onValueChange don't depend on if the multiple is true or not causing the component to always expect and array

Accordion is the same and the value is always an array

@mj12albert lmao, no worries, I'll work on keeping it an array while having it still be generic

michaelhazan avatar Nov 26 '25 16:11 michaelhazan