forked from ddrilling/asb_cloud_front
Доработано очищение графика телеметрии
This commit is contained in:
parent
9c85b1e229
commit
f82b80d0d0
@ -157,14 +157,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