react-component / react-component/slider

tooltip is not visible in range slider

Open
#678 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.1k
Forks
768
Avg merge
11d 22h
Merged PRs (30d)
5

Description

I tried to set up the range slider with tooltip as follows,

<Range
        name="value"
        min={0}
        max={20}
        defaultValue={sliderValues}
        tipFormatter={(value) => <span className="tooltip">{value}</span>}
  />

In the console, it shows the following error,

Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Handle which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://fb.me/react-strict-mode-find-node
    in div (created by Handle)
    in Handle (created by ComponentEnhancer(Range))
    in div (created by ComponentEnhancer(Range))
    in ComponentEnhancer(Range) (at Slider.js:22)
    in ValueSlider (at Hazard.js:15)
    in div (at Hazard.js:12)
    in Hazard (at PrivateRoute.js:16)
    in Route (at PrivateRoute.js:8)
    in PrivateRoute (created by ConnectFunction)
    in ConnectFunction (at App.js:64)
    in Switch (at App.js:48)
    in Router (created by BrowserRouter)
    in BrowserRouter (at App.js:46)
    in Provider (at App.js:45)
    in App (at src/index.js:8)
    in StrictMode (at src/index.js:7)

But my tooltip is not visible. am I missing something?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Range example with tipFormatter under React StrictMode, then inspect the Range and Handle entry points shown in the warning and the usage at Slider.js:22. Determine whether the tooltip is rendered and whether the findDOMNode warning affects its visibility; done means the supplied tooltip appears without the reported failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.