UI fix
This commit is contained in:
@@ -34,6 +34,27 @@ export function useThrottledParameterValue(parameter, onParameterChange) {
|
||||
}
|
||||
}, [draftValue, currentValue]);
|
||||
|
||||
useEffect(() => {
|
||||
if (isInteractingRef.current) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (valuesMatch(currentValue, latestDraftRef.current)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pendingTimeoutRef.current) {
|
||||
clearTimeout(pendingTimeoutRef.current);
|
||||
pendingTimeoutRef.current = null;
|
||||
}
|
||||
|
||||
setDraftValue(currentValue);
|
||||
setAppliedValue(currentValue);
|
||||
latestDraftRef.current = currentValue;
|
||||
isDirtyRef.current = false;
|
||||
lastSentAtRef.current = 0;
|
||||
}, [currentValue]);
|
||||
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
if (pendingTimeoutRef.current) {
|
||||
|
||||
Reference in New Issue
Block a user