Polish custom time range dropdown
parent
f60aa7d660
commit
e15cbd0d9d
|
@ -10,7 +10,7 @@ class CustomTimeRangeDropdown extends Component {
|
|||
super(props)
|
||||
|
||||
this.state = {
|
||||
isDropdownOpen: false,
|
||||
expanded: false,
|
||||
}
|
||||
|
||||
this.handleToggleDropdown = ::this.handleToggleDropdown
|
||||
|
@ -22,22 +22,23 @@ class CustomTimeRangeDropdown extends Component {
|
|||
}
|
||||
|
||||
handleToggleDropdown() {
|
||||
this.setState({isDropdownOpen: !this.state.isDropdownOpen})
|
||||
this.setState({expanded: !this.state.expanded})
|
||||
}
|
||||
|
||||
handleCloseDropdown() {
|
||||
this.setState({isDropdownOpen: false})
|
||||
this.setState({expanded: false})
|
||||
}
|
||||
|
||||
render() {
|
||||
const {timeRange: {upper, lower}, timeRange, onApplyTimeRange} = this.props
|
||||
|
||||
const {isDropdownOpen} = this.state
|
||||
const {expanded} = this.state
|
||||
|
||||
return (
|
||||
<div
|
||||
className={classnames('custom-time-range', {open: isDropdownOpen})}
|
||||
style={{display: 'flex'}}
|
||||
className={classnames('dropdown dropdown-280 custom-time-range', {
|
||||
open: expanded,
|
||||
})}
|
||||
>
|
||||
<button
|
||||
className="btn btn-sm btn-default dropdown-toggle"
|
||||
|
|
Loading…
Reference in New Issue