mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-13 19:33:46 +00:00
refactor: event editor color picker (#1400)
* refactor: event editor color picker * refactor: throttle and debounce function signature
This commit is contained in:
@@ -12,7 +12,7 @@ import useCustomFields from '../../common/hooks-query/useCustomFields';
|
||||
import useProjectData from '../../common/hooks-query/useProjectData';
|
||||
import useRundown from '../../common/hooks-query/useRundown';
|
||||
import useSettings from '../../common/hooks-query/useSettings';
|
||||
import { debounce } from '../../common/utils/debounce';
|
||||
import { throttle } from '../../common/utils/throttle';
|
||||
import { getDefaultFormat } from '../../common/utils/time';
|
||||
import { getPropertyValue, isStringBoolean } from '../viewers/common/viewUtils';
|
||||
|
||||
@@ -85,7 +85,7 @@ export default function Operator() {
|
||||
}
|
||||
}
|
||||
};
|
||||
const debouncedHandleScroll = debounce(handleUserScroll, 1000);
|
||||
const throttledHandleScroll = throttle(handleUserScroll, 1000);
|
||||
|
||||
const handleScroll = () => {
|
||||
if (timeoutId.current) {
|
||||
@@ -97,7 +97,7 @@ export default function Operator() {
|
||||
|
||||
setShowEditPrompt(true);
|
||||
|
||||
debouncedHandleScroll();
|
||||
throttledHandleScroll();
|
||||
};
|
||||
|
||||
const handleEdit = useCallback((event: EditEvent) => {
|
||||
|
||||
Reference in New Issue
Block a user