react-component / react-component/slider
z-index and drag position for tooltip
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.1k
- Forks
- 768
- Avg merge
- 11d 22h
- Merged PRs (30d)
- 5
Description
The tooltip is not functioning properly for me. When the tooltip is in this drawer component, it is not visible, because it is behind the drawer. I also put an example outside of the drawer. The tooltip is visible, but its position does not update while it is dragging. Please excuse some of the overlap with the drawer.
This question is similar to issue 143
`
import React, { Component } from 'react';
import './App.css';
// import for slider and range
import 'rc-slider/assets/index.css';
import 'rc-tooltip/assets/bootstrap.css';
import Slider, { Range } from 'rc-slider';
import Tooltip from 'rc-tooltip';
// materialize-ui
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import Drawer from 'material-ui/Drawer';
import { List, ListItem } from 'material-ui/List';
import Subheader from 'material-ui/Subheader';
class App extends React.Component {
constructor(props) {
super(props);
this.state = { open: true };
}
render() {
const marks = {
0: <strong>0</strong>,
6000: <strong>6000</strong>
};
const createSliderWithTooltip = Slider.createSliderWithTooltip;
const Range = createSliderWithTooltip(Slider.Range);
return (
<div>
<MuiThemeProvider>
<Drawer>
<List >
<Subheader>Choose Options</Subheader>
<ListItem
primaryText="ListItem1"
leftIcon={<i className="fas fa-folder-open"/>}
primaryTogglesNestedList={true}
nestedItems={[
<ListItem
key="NestedLI"
secondaryText={
<span>
<p>the tooltip is behind the drawer, assuming its position does not adjust either</p>
<Range
min={0}
max={6000}
step={20}
marks={marks}
// onChange={this.log}
defaultValue={[1000, 5000]}
tipFormatter={value => `${value}`}
/>
</span>
}
/>
]}
/>
</List>
</Drawer>
</MuiThemeProvider>
<p> Test, the tooltip is visable but its position does not ajust</p>
<Range
min={0}
max={6000}
step={20}
marks={marks}
// onChange={this.log}
defaultValue={[1000, 5000]}
tipFormatter={value => `${value}`}
/>
</div>
);
}
}
export default App;
`
Contributor guide
No contributing guide indexed for this repository
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 supplied React example using createSliderWithTooltip, Range, rc-tooltip, and the Material-UI Drawer; reproduce both the drawer overlap and the standalone dragging case. Trace the tooltip behavior during handle movement and its stacking context. Done means the tooltip appears above the drawer and its position updates while dragging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100