push
github
1384 of 2803 branches covered (49.38%)
0 of 691 new or added lines in 17 files covered. (0.0%)
14014 of 78513 relevant lines covered (17.85%)
1.77 hits per line
NEW
|
import { useViews } from '@teable/sdk/hooks'; |
|
NEW
|
import { Selector } from '@teable/ui-lib/base'; |
× |
NEW
|
import { useTranslation } from 'next-i18next'; |
× |
NEW
|
import { developerConfig } from '@/features/i18n/developer.config'; |
× |
NEW
|
|
× |
NEW
|
export const ViewBuilder = ({ |
× |
NEW
|
viewId, |
× |
NEW
|
onChange, |
× |
NEW
|
}: { |
× |
NEW
|
viewId?: string;
|
× |
NEW
|
onChange: (viewId: string | undefined) => void; |
× |
NEW
|
}) => { |
× |
NEW
|
const views = useViews();
|
× |
NEW
|
const { t } = useTranslation(developerConfig.i18nNamespaces);
|
× |
NEW
|
|
× |
NEW
|
return (
|
× |
NEW
|
<Selector |
× |
NEW
|
className="w-80"
|
× |
NEW
|
selectedId={viewId} |
× |
NEW
|
onChange={(id) => onChange(id || undefined)} |
× |
NEW
|
candidates={views} |
× |
NEW
|
placeholder={t('sdk:common.selectPlaceHolder')} |
× |
NEW
|
/> |
× |
NEW
|
); |
× |
NEW
|
}; |
× |