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

    Custom context menu action for files in the file manager.

    const analyzeAction: CustomContextAction = {
    id: 'analyze',
    label: 'Analyze Recording',
    icon: <AutoAwesomeIcon fontSize="small" />,
    onClick: (file) => analyzeRecording(file.recordingId),
    isVisible: (file) => file.resourceType === 'recording',
    isDisabled: (file) => !!file.appData?.analysisComplete,
    };

    <FileManager customContextActions={[analyzeAction]} />
    interface CustomContextAction {
        icon?: ReactNode;
        id: string;
        isDisabled?: (file: FileEntry) => boolean;
        isVisible?: (file: FileEntry) => boolean;
        label: string;
        onClick: (file: FileEntry) => void;
    }
    Index

    Properties

    icon?: ReactNode

    Menu item icon

    id: string

    Unique identifier

    isDisabled?: (file: FileEntry) => boolean

    Return true to show as disabled for a specific file

    isVisible?: (file: FileEntry) => boolean

    Return false to hide this action for a specific file

    label: string

    Menu item label

    onClick: (file: FileEntry) => void

    Called when the menu item is clicked