fix: file picker opening on delete

This commit is contained in:
Ary Neto
2024-11-26 18:44:32 -07:00
committed by Carlos Valente
parent f3f4cdb19f
commit e7b5baa49a
2 changed files with 5 additions and 3 deletions
@@ -68,7 +68,9 @@ export default function ProjectData() {
uploadInputRef.current?.click();
};
const handleDeleteLogo = () => {
const handleDeleteLogo = (e: React.MouseEvent<HTMLButtonElement>) => {
e.preventDefault();
e.stopPropagation();
setValue('projectLogo', null, {
shouldDirty: true,
});
@@ -1,6 +1,6 @@
import { KeyboardEvent, useState } from 'react';
import { Input, Modal, ModalBody, ModalContent, ModalFooter, ModalOverlay } from '@chakra-ui/react';
import { useDebouncedCallback } from '@mantine/hooks';
import { useDebounceCallback } from '@mantine/hooks';
import { isOntimeEvent, SupportedEvent } from 'ontime-types';
import { useEventSelection } from '../../rundown/useEventSelection';
@@ -20,7 +20,7 @@ export default function Finder(props: FinderProps) {
const [selected, setSelected] = useState(0);
const setSelectedEvents = useEventSelection((state) => state.setSelectedEvents);
const debouncedFind = useDebouncedCallback(find, 100);
const debouncedFind = useDebounceCallback(find, 100);
const navigate = (event: KeyboardEvent<HTMLDivElement>) => {
// all operations need results