Unverified Commit b9762711 authored by davelopez's avatar davelopez
Browse files

Fix callback type to accept single or multiple selection results

parent 723af6fb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ const filesSources = useFileSources();

interface FilesDialogProps {
    /** Callback function to be called passing the results when selection is complete */
    callback?: (files: SelectionItem[]) => void;
    callback?: (files: SelectionItem | SelectionItem[]) => void;
    /** Options to filter the file sources */
    filterOptions?: FilterFileSourcesOptions;
    /** Decide wether to keep the underlying modal static or dynamic */
@@ -424,7 +424,7 @@ function onSelectAll() {
function finalize() {
    const results = selectionModel.value.finalize();
    modalShow.value = false;
    props.callback(Array.isArray(results) ? results : [results]);
    props.callback(results);
}

function onOk() {