material-components / material-components/material-web
Add coercing to properties to ensure type safety (`disabled = undefined || null` is not supported)
Nobody has claimed this yet.
- Dominant language
- SCSS
- Stars
- 11.3k
- Forks
- 1.1k
- Avg merge
- 20h 28m
- Merged PRs (30d)
- 13
Description
What is affected?
Component
Description
When I set disabled to undefined on an md-slider, the slider is disabled.
Reproduction
Workaround
Set disabled to null instead of undefined to disable a slider.
Is this a regression?
Yes. This used to work, but now it doesn't.
Affected versions
1.1.1
Browser/OS/Node environment
Browser: Firefox 121.0
OS: macOS 14.2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the md-slider cases in the linked Lit playground reproduction and compare them with the adjacent input examples using undefined and null. Trace the slider's property handling, then verify that the reported undefined/null behavior matches the intended semantics described in the issue. Done means the reproduction behaves correctly and a regression test covers it if component tests exist.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100