mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 05:13:32 +00:00
fix: file picker opening on delete
This commit is contained in:
@@ -68,7 +68,9 @@ export default function ProjectData() {
|
|||||||
uploadInputRef.current?.click();
|
uploadInputRef.current?.click();
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleDeleteLogo = () => {
|
const handleDeleteLogo = (e: React.MouseEvent<HTMLButtonElement>) => {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
setValue('projectLogo', null, {
|
setValue('projectLogo', null, {
|
||||||
shouldDirty: true,
|
shouldDirty: true,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { KeyboardEvent, useState } from 'react';
|
import { KeyboardEvent, useState } from 'react';
|
||||||
import { Input, Modal, ModalBody, ModalContent, ModalFooter, ModalOverlay } from '@chakra-ui/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 { isOntimeEvent, SupportedEvent } from 'ontime-types';
|
||||||
|
|
||||||
import { useEventSelection } from '../../rundown/useEventSelection';
|
import { useEventSelection } from '../../rundown/useEventSelection';
|
||||||
@@ -20,7 +20,7 @@ export default function Finder(props: FinderProps) {
|
|||||||
const [selected, setSelected] = useState(0);
|
const [selected, setSelected] = useState(0);
|
||||||
|
|
||||||
const setSelectedEvents = useEventSelection((state) => state.setSelectedEvents);
|
const setSelectedEvents = useEventSelection((state) => state.setSelectedEvents);
|
||||||
const debouncedFind = useDebouncedCallback(find, 100);
|
const debouncedFind = useDebounceCallback(find, 100);
|
||||||
|
|
||||||
const navigate = (event: KeyboardEvent<HTMLDivElement>) => {
|
const navigate = (event: KeyboardEvent<HTMLDivElement>) => {
|
||||||
// all operations need results
|
// all operations need results
|
||||||
|
|||||||
Reference in New Issue
Block a user