FilePicker Vue component (implemented as async component)

<template>
<FilePicker name="Select a file" :buttons="buttons" />
</template>
<script setup lang="ts">
import { FilePickerVue as FilePicker, type IFilePickerButton } from '@nextcloud/dialogs'
const buttons: IFilePickerButton[] = [{
label: 'Pick',
callback: (nodes) => console.log('Picked', nodes)
}]
</script
  • Parameters

    • resolve: ((component: Component<DefaultData<never>, DefaultMethods<never>, DefaultComputed, __VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
          allowPickDirectory?: boolean;
          buttons: IFilePickerButton[] | IFilePickerButtonFactory;
          container?: string;
          disabledNavigation?: boolean;
          filterFn?: IFilePickerFilter;
          mimetypeFilter?: string[];
          multiselect?: boolean;
          name: string;
          path?: string;
      }>, {
          allowPickDirectory: boolean;
          container: string;
          disabledNavigation: boolean;
          filterFn: undefined;
          mimetypeFilter: (() => never[]);
          multiselect: boolean;
          path: undefined;
      }>, {}>) => void)
        • (component): void
        • Parameters

          • component: Component<DefaultData<never>, DefaultMethods<never>, DefaultComputed, __VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
                allowPickDirectory?: boolean;
                buttons: IFilePickerButton[] | IFilePickerButtonFactory;
                container?: string;
                disabledNavigation?: boolean;
                filterFn?: IFilePickerFilter;
                mimetypeFilter?: string[];
                multiselect?: boolean;
                name: string;
                path?: string;
            }>, {
                allowPickDirectory: boolean;
                container: string;
                disabledNavigation: boolean;
                filterFn: undefined;
                mimetypeFilter: (() => never[]);
                multiselect: boolean;
                path: undefined;
            }>, {}>

          Returns void

    • reject: ((reason?: any) => void)
        • (reason?): void
        • Parameters

          • Optionalreason: any

          Returns void

    Returns void | Promise<ImportedComponent<DefaultData<never>, DefaultMethods<never>, DefaultComputed, __VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
        allowPickDirectory?: boolean;
        buttons: IFilePickerButton[] | IFilePickerButtonFactory;
        container?: string;
        disabledNavigation?: boolean;
        filterFn?: IFilePickerFilter;
        mimetypeFilter?: string[];
        multiselect?: boolean;
        name: string;
        path?: string;
    }>, {
        allowPickDirectory: boolean;
        container: string;
        disabledNavigation: boolean;
        filterFn: undefined;
        mimetypeFilter: (() => never[]);
        multiselect: boolean;
        path: undefined;
    }>, {}>> | {
        component: Promise<ImportedComponent<DefaultData<never>, DefaultMethods<never>, DefaultComputed, __VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
            allowPickDirectory?: boolean;
            buttons: IFilePickerButton[] | IFilePickerButtonFactory;
            container?: string;
            disabledNavigation?: boolean;
            filterFn?: IFilePickerFilter;
            mimetypeFilter?: string[];
            multiselect?: boolean;
            name: string;
            path?: string;
        }>, {
            allowPickDirectory: boolean;
            container: string;
            disabledNavigation: boolean;
            filterFn: undefined;
            mimetypeFilter: (() => never[]);
            multiselect: boolean;
            path: undefined;
        }>, {}>>;
        delay?: number;
        error?: ImportedComponent<DefaultData<never>, DefaultMethods<never>, DefaultComputed, DefaultProps, {}>;
        loading?: ImportedComponent<DefaultData<never>, DefaultMethods<never>, DefaultComputed, DefaultProps, {}>;
        timeout?: number;
    }