import { TableSettingsMenuAutoRefresh } from '@/portainer/components/datatables/components/TableSettingsMenuAutoRefresh'; import { useTableSettings } from '@/portainer/components/datatables/components/useTableSettings'; import { Checkbox } from '@/portainer/components/form-components/Checkbox'; import type { ContainersTableSettings } from '@/docker/containers/types'; interface Props { isRefreshVisible: boolean; } export function ContainersDatatableSettings({ isRefreshVisible }: Props) { const { settings, setTableSettings } = useTableSettings(); return ( <> 0} onChange={() => setTableSettings((settings) => ({ ...settings, truncateContainerName: settings.truncateContainerName > 0 ? 0 : 32, })) } /> {isRefreshVisible && ( )} ); function handleRefreshRateChange(autoRefreshRate: number) { setTableSettings({ autoRefreshRate }); } }