mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-13 17:27:37 -05:00
fixed scrolling perf using ref callbacks
This commit is contained in:
@@ -334,7 +334,7 @@ useLayoutEffect(() => {
|
|||||||
}, [groupsData])
|
}, [groupsData])
|
||||||
|
|
||||||
|
|
||||||
|
const setPositionRef = node => positionRef.current = node;
|
||||||
|
|
||||||
|
|
||||||
let archiveLabel = "";
|
let archiveLabel = "";
|
||||||
@@ -360,7 +360,7 @@ useLayoutEffect(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={positionRef}>
|
<div ref={setPositionRef}>
|
||||||
<FilterModal shortName={shortName} open={filterVisible} onClose={handleFilterClose} />
|
<FilterModal shortName={shortName} open={filterVisible} onClose={handleFilterClose} />
|
||||||
<CalendarModal open={calendarVisible} onClose={handleCalendarClose} archive={archive} key={shortName} />
|
<CalendarModal open={calendarVisible} onClose={handleCalendarClose} archive={archive} key={shortName} />
|
||||||
<GroupModal shortName={shortName} open={groupVisible} onClose={handleGroupClose} />
|
<GroupModal shortName={shortName} open={groupVisible} onClose={handleGroupClose} />
|
||||||
|
|||||||
Reference in New Issue
Block a user