Skip to content

[slider] Remove validation commit on touchend - #4091

Merged
atomiks merged 2 commits into
mui:masterfrom
jijiseong:fix/validation
Feb 16, 2026
Merged

atomiks merged 2 commits into
mui:masterfrom
jijiseong:fix/validation

Conversation

@jijiseong

@jijiseong jijiseong commented Feb 13, 2026 •

Copy link
Copy Markdown
Contributor

fixes #4090

I remove validation calling from handTouchEnd in SliderControl.
It is already handled by SliderRoot's useValueChanged

@jijiseong jijiseong changed the title [slider] remove validation calling from handTouchEnd [slider] removed validation calling from handTouchEnd Feb 13, 2026
@pkg-pr-new

pkg-pr-new Bot commented Feb 13, 2026 •

Copy link
Copy Markdown
  • base-ui-tanstack-start

  • vite-css-base-ui-example

    pnpm add https://pkg.pr.new/@base-ui/react@4091
    
    pnpm add https://pkg.pr.new/@base-ui/utils@4091
    

commit: 67aee47

@mui-bot

mui-bot commented Feb 13, 2026 •

Copy link
Copy Markdown

Bundle size report

Bundle Parsed size Gzip size
@base-ui/react ▼-27B(-0.01%) 🔺+33B(+0.02%)

Details of bundle changes


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

@netlify

netlify Bot commented Feb 13, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 67aee47
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/699311853e99fc0008f7e738
😎 Deploy Preview https://deploy-preview-4091--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.

@jijiseong
jijiseong marked this pull request as ready for review February 13, 2026 18:54
@greptile-apps

greptile-apps Bot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

Removed duplicate validation call from SliderControl.tsx's handleTouchEnd function. The validation was being called twice - once in handleTouchEnd and again in SliderRoot's useValueChanged hook (SliderRoot.tsx:176-183). The useValueChanged hook already handles validation correctly based on the validationMode setting, making the call in handleTouchEnd redundant. This fix ensures validation only occurs at the appropriate time according to the field's configuration.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change correctly removes duplicate validation logic, includes appropriate test coverage, and aligns with the existing validation architecture where SliderRoot's useValueChanged hook handles all validation
  • No files require special attention

Important Files Changed

Filename Overview
packages/react/src/slider/control/SliderControl.tsx Removed duplicate validation.commit() call from handleTouchEnd - validation is already handled by SliderRoot's useValueChanged hook
packages/react/src/slider/root/SliderRoot.test.tsx Added test verifying that validate is not called during pointer interactions when validationMode is omitted

Last reviewed commit: cd987a7

@jijiseong jijiseong changed the title [slider] removed validation calling from handTouchEnd [slider] Removed validation calling from handTouchEnd Feb 13, 2026
@atomiks atomiks added component: slider Changes related to the slider component. type: bug It doesn't behave as expected. labels Feb 16, 2026
@greptile-apps

greptile-apps Bot commented Feb 16, 2026

Copy link
Copy Markdown
Contributor

Automatic reviews are disabled for this repository.

@atomiks atomiks changed the title [slider] Removed validation calling from handTouchEnd [slider] Remove validation commit on touchend Feb 16, 2026
@atomiks
atomiks merged commit 53b9f67 into mui:master Feb 16, 2026
7 checks passed
@jijiseong
jijiseong deleted the fix/validation branch February 17, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: slider Changes related to the slider component. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[slider] Validation occurs after thumb drag by default

3 participants