forked from ddrilling/asb_cloud_front
Доработано очищение графика телеметрии
This commit is contained in:
parent
bf2d6d6d36
commit
33b6a2012a
@ -156,14 +156,14 @@ const TelemetryView = memo(() => {
|
||||
const spinSubject$ = useMemo(() => new BehaviorSubject(), [])
|
||||
|
||||
const handleDataSaub = useCallback((data, replace = false) => {
|
||||
if (data) {
|
||||
const dataSaub = normalizeData(data)
|
||||
setDataSaub((prev) => {
|
||||
if (!data)
|
||||
return replace ? [] : prev
|
||||
const dataSaub = normalizeData(data)
|
||||
const out = replace ? [...dataSaub] : [...prev, ...dataSaub]
|
||||
out.sort(dateSorter)
|
||||
return out
|
||||
})
|
||||
}
|
||||
}, [])
|
||||
|
||||
const handleDataSpin = useCallback((data) => data && setDataSpin((prev) => [...prev, ...data]), [])
|
||||
|
Loading…
Reference in New Issue
Block a user