From 5a4a6eb7d9568e5d596ccfe2bbb14bde78c39448 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Tue, 27 Feb 2024 12:39:19 +0000 Subject: [PATCH] feat(nc-gui): add single select list options layout --- .../nc-gui/components/cell/SingleSelect.vue | 190 ++++++++++++------ .../nc-gui/components/smartsheet/Form.vue | 60 +++++- packages/nc-gui/lang/en.json | 5 +- 3 files changed, 179 insertions(+), 76 deletions(-) diff --git a/packages/nc-gui/components/cell/SingleSelect.vue b/packages/nc-gui/components/cell/SingleSelect.vue index 1ca601c92f..fac921b5c7 100644 --- a/packages/nc-gui/components/cell/SingleSelect.vue +++ b/packages/nc-gui/components/cell/SingleSelect.vue @@ -272,82 +272,66 @@ const onFocus = () => { @@ -412,6 +455,19 @@ const onFocus = () => { :deep(.ant-select-clear > span) { @apply block; } +.nc-field-layout-list { + @apply !flex !flex-col !items-start w-full !space-y-0.5 !max-w-full; + + :deep(.ant-radio-wrapper) { + @apply !m-0 !h-9 !mr-0 !flex !items-center w-full !max-w-full pl-2 rounded-lg hover:bg-gray-100; + .ant-radio { + @apply !top-0; + } + .ant-radio + span { + @apply !flex !pl-4 max-w-[calc(100%_-_16px)]; + } + } +} diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json index 8d8dacb99b..3598e1f691 100644 --- a/packages/nc-gui/lang/en.json +++ b/packages/nc-gui/lang/en.json @@ -692,7 +692,10 @@ "backgroundColor":"Background Color", "hideNocodbBranding":"Hide NocoDB Branding", "showOnConditions": "Show on condtions", - "showFieldOnConditionsMet":"Shows field only when conditions are met" + "showFieldOnConditionsMet":"Shows field only when conditions are met", + "limitOptions": "Limit ptions", + "limitOptionsSubtext": "Limit options visible to users by selecting available options", + "clearSelection": "Clear selection" }, "activity": { "noRange": "Calendar view requires a date range",