ui: fix autoopen state
This commit is contained in:
parent
0533624c25
commit
74f6c2cd66
1 changed files with 7 additions and 0 deletions
|
|
@ -20,6 +20,13 @@ function FilterValue(props: Props) {
|
|||
const { filter } = props;
|
||||
const isAutoOpen = filter.autoOpen;
|
||||
|
||||
React.useEffect(() => {
|
||||
if (isAutoOpen) {
|
||||
setTimeout(() => {
|
||||
filter.autoOpen = false;
|
||||
}, 250)
|
||||
}
|
||||
}, [isAutoOpen])
|
||||
const [durationValues, setDurationValues] = useState({
|
||||
minDuration: filter.value?.[0],
|
||||
maxDuration: filter.value.length > 1 ? filter.value[1] : filter.value[0],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue