diff --git a/src/components/load-modal/local.tsx b/src/components/load-modal/local.tsx index f5b93e24..22c6758b 100644 --- a/src/components/load-modal/local.tsx +++ b/src/components/load-modal/local.tsx @@ -76,7 +76,7 @@ const LocalComponent = observer(() => { setIsFileSupported(handleFileChange(e, false))} data-testid='dt-load-strategy-file-input' @@ -121,7 +121,12 @@ const LocalComponent = observer(() => { : localize('Please upload an XML file') } data-testid='dt_load-strategy__local-upload' - onClick={() => file_input_ref?.current?.click()} + onClick={() => { + if (file_input_ref.current) { + file_input_ref.current.setAttribute('accept', '.xml'); + file_input_ref.current.click(); + } + }} has_effect primary large