Alternative for trackStyle and handleStyle
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- react, typescript
- Domain
- frontend
Research direction
Start by reviewing the Slider API and the type definition for styles.track and styles.handle, then compare them with the deprecated trackStyle and handleStyle props shown in the issue. Determine whether multiple per-track and per-handle values are supported or require an API change; done means the use case has a documented, working approach or a clearly specified replacement.
Written by the indexing model from the issue text.
Description
I have a usecase like this where I want to provide different color and styling to different tracks and handles so I used trackStyle and handleStyle as array
<Slider
value={values}
step={1}
range={{ maxCount: 4 }}
allowCross={false}
marks={marks}
dots={false}
trackStyle={[
{ backgroundColor: "green", height: height },
{ backgroundColor: "yellow", height: height },
{ backgroundColor: "red", height: height },
]}
onChange={handleChange}
handleStyle={[
{ display: "none" },
handleStyle,
handleStyle,
{ display: "none" },
]}
railStyle={{ height: height }}
handleRender={handleRender}
activeDotStyle={{ display: "none" }}
/>
But now both these properties are deprecated, and we have to use styles.track or styles.handle for this but I'm not able to identify how to provide multiple values in styles.track since it takes a simple object.
Partial<Record<SemanticName, React.CSSProperties>>;
Can we do something in this case?
- Dominant language
- TypeScript
- Stars
- 3.1k
- Forks
- 767
- Avg merge
- 11m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from react-component/slider
-
Docs site is brokenOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
react-component/slider#1067 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
react-component/slider#1064 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
react-component/slider#1061 ·
-
当Slider宽度超过外层容器时,点击Slider,滚动条位置异常Possibly taken @nrps9909 claimed this 38 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
react-component/slider#1060 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
react-component/slider#1058 · 1 comment ·
All issues in react-component/slider
Similar issues
-
perf(core): getComments() runs the approved count and the comment list as two sequential queriesOpenarea/core bot:bug bot:working
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
emdash-cms/emdash#3905 · 2 comments ·
Maintainers usually reply within 1 day
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 90/100
lingdojo/kana-dojo#31728 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
selective-claw: freshTailTurns=0 keeps ALL turns verbatim and summarizes none (slice(-0) === slice(0))Possibly taken @zjncs claimed this today. Opencomponent:tokenless
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
agentic-os-org/ANOLISA#6112 · 1 comment ·
Maintainers usually reply within 1 day
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
rjsf-team/react-jsonschema-form#5439 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day