ISimpleConfigurationTableProps

Definition

export interface ISimpleConfigurationTableProps {
    /** Context object for UXP features */
    uxpContext: IContextProvider;

    /** Function returning table data */
    data: () => Promise<RowData[]>;

    /** Text to display when there is no data */
    noDataText?: string;

    /** Columns for the editable table */
    columns: TableColumn[];

    /** Callback for adding a new item */
    onAddItem?: (item: RowData) => Promise<{ success: boolean, error?: string }>;

    /** Callback for updating an existing item */
    onUpdateItem?: (item: RowData) => Promise<{ success: boolean, error?: string }>;

    /** Callback for deleting an item */
    onDeleteItem?: (item: RowData) => Promise<{ success: boolean, error?: string }>;

    /** Enable drag and drop row reordering */
    onReorderItems?: (reorderedData: RowData[]) => Promise<{ success: boolean, error?: string }>;

    /** Role-based permissions */
    roles?: {
        /** Determines if user can add items */
        canAdd?: () => boolean;

        /** Determines if user can edit items */
        canEdit?: () => boolean;

        /** Determines if user can delete items */
        canDelete?: () => boolean;
    };

    /** Labels for buttons and notifications */
    labels?: {
        add?: string;
        save?: string;
        cancel?: string;
        delete?: string;
        edit?: string;
        saved?: string;
        deleted?: string;
    };
}

Usage

Last updated