Skip to main content
Glama
deleonio
by deleonio
settings-column-options.tsx2.01 kB
import { KolTableStateful } from '@public-ui/react-v19'; import type { FC } from 'react'; import React from 'react'; import { SampleDescription } from '../SampleDescription'; type UserRow = { id: string; name: string; team: string; email: string; status: string; }; const DATA: UserRow[] = [ { id: 'U-001', name: 'Andrea Schmidt', team: 'Design', email: 'andrea@example.org', status: 'Active' }, { id: 'U-002', name: 'Boris Klein', team: 'Engineering', email: 'boris@example.org', status: 'Active' }, { id: 'U-003', name: 'Chiara Russo', team: 'Support', email: 'chiara@example.org', status: 'On leave' }, ]; export const TableSettingsColumnOptions: FC = () => ( <> <SampleDescription> <p> This example demonstrates how the table settings respect column metadata. Some columns can be hidden, reordered, or resized, while others stay locked based on their <code>hidable</code>, <code>sortable</code>, and <code>resizable</code> flags. </p> </SampleDescription> <KolTableStateful _label="Table with column option restrictions" _minWidth="auto" _hasSettingsMenu _headers={{ horizontal: [ [ { key: 'id', label: 'ID', hidable: false, sortable: false }, { key: 'name', label: 'Name' }, { key: 'team', label: 'Team', sortable: false }, { key: 'email', label: 'E-Mail', resizable: false }, { key: 'status', label: 'Status', hidable: false, resizable: false }, ], ], }} _tableSettings={{ columns: [ { hidable: false, key: 'id', label: 'ID', sortable: false, visible: true, width: 15 }, { key: 'name', label: 'Name', visible: true, width: 30 }, { key: 'team', label: 'Team', sortable: false, visible: true, width: 20 }, { key: 'email', label: 'E-Mail', resizable: false, visible: true, width: 25 }, { hidable: false, key: 'status', label: 'Status', resizable: false, visible: true, width: 10 }, ], }} _data={DATA} className="block" style={{ maxWidth: '720px' }} /> </> );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/deleonio/public-ui-kolibri'

If you have feedback or need assistance with the MCP directory API, please join our Discord server