From 95b475c8559e61cdca5f29caacc5e8ef3ec1eecf Mon Sep 17 00:00:00 2001 From: Sanskar Jain <52746480+sans-byte@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:06:25 +0530 Subject: [PATCH] Fixes "No Result" flash and add a separator (#8140) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix for #8137 --------- Co-authored-by: FĂ©lix Malfait --- .github/workflows/ci-tinybird.yaml | 2 +- .../components/MultiRecordSelect.tsx | 44 +++++++++++-------- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci-tinybird.yaml b/.github/workflows/ci-tinybird.yaml index af4e591c60..acc57bfd75 100644 --- a/.github/workflows/ci-tinybird.yaml +++ b/.github/workflows/ci-tinybird.yaml @@ -17,5 +17,5 @@ jobs: with: data_project_dir: packages/twenty-tinybird secrets: - tb_admin_token: ${{ secrets.TINYBIRD_ADMIN_TOKEN }} + tb_admin_token: ${{ secrets.TB_ADMIN_TOKEN }} tb_host: https://api.eu-central-1.aws.tinybird.co \ No newline at end of file diff --git a/packages/twenty-front/src/modules/object-record/relation-picker/components/MultiRecordSelect.tsx b/packages/twenty-front/src/modules/object-record/relation-picker/components/MultiRecordSelect.tsx index cc69eae40f..b1c10cbbb6 100644 --- a/packages/twenty-front/src/modules/object-record/relation-picker/components/MultiRecordSelect.tsx +++ b/packages/twenty-front/src/modules/object-record/relation-picker/components/MultiRecordSelect.tsx @@ -13,7 +13,6 @@ import { DropdownMenuSeparator } from '@/ui/layout/dropdown/components/DropdownM import { SelectableItem } from '@/ui/layout/selectable-list/components/SelectableItem'; import { SelectableList } from '@/ui/layout/selectable-list/components/SelectableList'; import { useSelectableList } from '@/ui/layout/selectable-list/hooks/useSelectableList'; -import { MenuItem } from '@/ui/navigation/menu-item/components/MenuItem'; import { usePreviousHotkeyScope } from '@/ui/utilities/hotkey/hooks/usePreviousHotkeyScope'; import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys'; import { useSetHotkeyScope } from '@/ui/utilities/hotkey/hooks/useSetHotkeyScope'; @@ -119,22 +118,15 @@ export const MultiRecordSelect = ({ ); })} - {objectRecordsIdsMultiSelect?.length === 0 && - !recordMultiSelectIsLoading && } ); const createNewButton = isDefined(onCreate) && ( - <> - - - onCreate?.(relationPickerSearchFilter)} - LeftIcon={IconPlus} - text="Add New" - /> - - + onCreate?.(relationPickerSearchFilter)} + LeftIcon={IconPlus} + text="Add New" + /> ); return ( @@ -148,12 +140,20 @@ export const MultiRecordSelect = ({ {dropdownPlacement?.includes('end') && ( <> - {createNewButton} + + {createNewButton} + + {results} {recordMultiSelectIsLoading && !relationPickerSearchFilter && ( - + <> + + + + )} + {objectRecordsIdsMultiSelect?.length > 0 && ( + )} - )} {recordMultiSelectIsLoading && !relationPickerSearchFilter && ( - + <> + + + )} {results} - {createNewButton} + {objectRecordsIdsMultiSelect?.length > 0 && ( + + )} + + {createNewButton} + )}