mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-29 21:15:19 +00:00
Reduce update frequency for volume
This commit is contained in:
@@ -16,6 +16,9 @@ interface Props {
|
||||
className?: string;
|
||||
label: string;
|
||||
value: number;
|
||||
/**
|
||||
* Event handler called when the value changes during an interaction.
|
||||
*/
|
||||
onValueChange: (value: number) => void;
|
||||
/**
|
||||
* Event handler called when the value changes at the end of an interaction.
|
||||
@@ -45,7 +48,7 @@ export const Slider: FC<Props> = ({
|
||||
disabled,
|
||||
}) => {
|
||||
const onValueChange = useCallback(
|
||||
([v]: number[]) => onValueChangeProp(v),
|
||||
([v]: number[]) => onValueChangeProp?.(v),
|
||||
[onValueChangeProp],
|
||||
);
|
||||
const onValueCommit = useCallback(
|
||||
|
||||
Reference in New Issue
Block a user