Hiyve Components - v1.0.0
    Preparing search index...

    Interface UseFileSelectionResult

    Result of the useFileSelection hook.

    interface UseFileSelectionResult {
        areAllFilesSelected: (files: FileEntry[]) => boolean;
        areSomeFilesSelected: (files: FileEntry[]) => boolean;
        clearSelection: () => void;
        getFilesToOperate: () => FileEntry[];
        getSelectedFile: () => FileEntry | null;
        getSelectedFolder: () => FolderEntry | null;
        handleSelectAll: (files: FileEntry[], checked: boolean) => void;
        handleSelectItem: (item: FileSystemItem) => void;
        handleToggleSelect: (file: FileEntry, checked: boolean) => void;
        isFileSelected: (file: FileEntry) => boolean;
        selectedFiles: FileEntry[];
        selectedItem: FileSystemItem | null;
    }
    Index

    Properties

    areAllFilesSelected: (files: FileEntry[]) => boolean

    Check if all files are selected

    areSomeFilesSelected: (files: FileEntry[]) => boolean

    Check if some (but not all) files are selected

    clearSelection: () => void

    Clear all selections

    getFilesToOperate: () => FileEntry[]

    Get files to operate on (multi-selected or single selected file)

    getSelectedFile: () => FileEntry | null

    Get the selected item if it's a file

    getSelectedFolder: () => FolderEntry | null

    Get the selected item if it's a folder

    handleSelectAll: (files: FileEntry[], checked: boolean) => void

    Handle select all checkbox

    handleSelectItem: (item: FileSystemItem) => void

    Handle clicking on an item (single select)

    handleToggleSelect: (file: FileEntry, checked: boolean) => void

    Handle checkbox toggle for multi-select

    isFileSelected: (file: FileEntry) => boolean

    Check if a file is selected

    selectedFiles: FileEntry[]

    Set of selected file IDs for multi-select

    selectedItem: FileSystemItem | null

    Currently selected single item (file or folder)