From c36cd33180badaa9b7f9e27c765f19cb03a50ccd Mon Sep 17 00:00:00 2001 From: Jonathan Fishner Date: Sun, 26 Jan 2025 19:27:35 +0200 Subject: [PATCH] fix(filter-tables) show clean filter if no-results (#532) * fix(filter-tables) show clean filter if no-results * add translations * remove some css classes --------- Co-authored-by: Guy Ben-Aharon --- package-lock.json | 169 +++++++++++++++++- package.json | 2 +- src/i18n/locales/ar.ts | 3 + src/i18n/locales/bn.ts | 3 + src/i18n/locales/de.ts | 3 + src/i18n/locales/en.ts | 2 + src/i18n/locales/es.ts | 3 + src/i18n/locales/fr.ts | 3 + src/i18n/locales/gu.ts | 3 + src/i18n/locales/hi.ts | 3 + src/i18n/locales/id_ID.ts | 3 + src/i18n/locales/ja.ts | 3 + src/i18n/locales/ko_KR.ts | 3 + src/i18n/locales/mr.ts | 3 + src/i18n/locales/ne.ts | 3 + src/i18n/locales/pt_BR.ts | 3 + src/i18n/locales/ru.ts | 3 + src/i18n/locales/te.ts | 3 + src/i18n/locales/tr.ts | 4 + src/i18n/locales/uk.ts | 3 + src/i18n/locales/vi.ts | 3 + src/i18n/locales/zh_CN.ts | 3 + src/i18n/locales/zh_TW.ts | 3 + .../tables-section/tables-section.tsx | 21 ++- 24 files changed, 248 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index c5f0d5b7..0506d0f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "@radix-ui/react-scroll-area": "^1.1.0", "@radix-ui/react-select": "^2.1.1", "@radix-ui/react-separator": "^1.1.0", - "@radix-ui/react-slot": "^1.1.0", + "@radix-ui/react-slot": "^1.1.1", "@radix-ui/react-tabs": "^1.1.0", "@radix-ui/react-toast": "^1.2.1", "@radix-ui/react-toggle": "^1.1.0", @@ -1905,6 +1905,24 @@ } } }, + "node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", + "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-arrow": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.0.tgz", @@ -2055,6 +2073,24 @@ } } }, + "node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", + "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-compose-refs": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz", @@ -2149,6 +2185,24 @@ } } }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", + "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-direction": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.0.tgz", @@ -2381,6 +2435,24 @@ } } }, + "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", + "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-menubar": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@radix-ui/react-menubar/-/react-menubar-1.1.2.tgz", @@ -2450,6 +2522,24 @@ } } }, + "node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", + "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-popper": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.0.tgz", @@ -2568,6 +2658,24 @@ } } }, + "node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", + "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-roving-focus": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.0.tgz", @@ -2688,6 +2796,24 @@ } } }, + "node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", + "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@radix-ui/react-separator/-/react-separator-1.1.0.tgz", @@ -2712,12 +2838,12 @@ } }, "node_modules/@radix-ui/react-slot": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", - "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.1.tgz", + "integrity": "sha512-RApLLOcINYJA+dMVbOju7MYv1Mb2EBp2nH4HdDzXTSyaR5optlm6Otrz1euW3HbdOR8UmmFK06TD+A9frYWv+g==", "license": "MIT", "dependencies": { - "@radix-ui/react-compose-refs": "1.1.0" + "@radix-ui/react-compose-refs": "1.1.1" }, "peerDependencies": { "@types/react": "*", @@ -2729,6 +2855,21 @@ } } }, + "node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.1.tgz", + "integrity": "sha512-Y9VzoRDSJtgFMUCoiZBDVo084VQ5hfpXxVE+NgkdNsjiDBByiImMZKKhxMwCbdHvhlENG6a833CbFkOQvTricw==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-tabs": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.1.1.tgz", @@ -2896,6 +3037,24 @@ } } }, + "node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", + "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-use-callback-ref": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.0.tgz", diff --git a/package.json b/package.json index fcdbe484..0f2e0dea 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "@radix-ui/react-scroll-area": "^1.1.0", "@radix-ui/react-select": "^2.1.1", "@radix-ui/react-separator": "^1.1.0", - "@radix-ui/react-slot": "^1.1.0", + "@radix-ui/react-slot": "^1.1.1", "@radix-ui/react-tabs": "^1.1.0", "@radix-ui/react-toast": "^1.2.1", "@radix-ui/react-toggle": "^1.1.0", diff --git a/src/i18n/locales/ar.ts b/src/i18n/locales/ar.ts index 8b802c9a..33a3ec85 100644 --- a/src/i18n/locales/ar.ts +++ b/src/i18n/locales/ar.ts @@ -124,6 +124,9 @@ export const ar: LanguageTranslation = { add_table: 'إضافة جدول', filter: 'تصفية', collapse: 'طي الكل', + // TODO: Translate + clear: 'Clear Filter', + no_results: 'No tables found matching your filter.', table: { fields: 'الحقول', diff --git a/src/i18n/locales/bn.ts b/src/i18n/locales/bn.ts index a923d251..28cd568a 100644 --- a/src/i18n/locales/bn.ts +++ b/src/i18n/locales/bn.ts @@ -125,6 +125,9 @@ export const bn: LanguageTranslation = { add_table: 'টেবিল যোগ করুন', filter: 'ফিল্টার', collapse: 'সব ভাঁজ করুন', + // TODO: Translate + clear: 'Clear Filter', + no_results: 'No tables found matching your filter.', table: { fields: 'ফিল্ড', diff --git a/src/i18n/locales/de.ts b/src/i18n/locales/de.ts index 5d4f4e3f..48c49a6c 100644 --- a/src/i18n/locales/de.ts +++ b/src/i18n/locales/de.ts @@ -126,6 +126,9 @@ export const de: LanguageTranslation = { add_table: 'Tabelle hinzufügen', filter: 'Filter', collapse: 'Alle einklappen', + // TODO: Translate + clear: 'Clear Filter', + no_results: 'No tables found matching your filter.', table: { fields: 'Felder', diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts index e1e9546c..2373369a 100644 --- a/src/i18n/locales/en.ts +++ b/src/i18n/locales/en.ts @@ -123,6 +123,8 @@ export const en = { add_table: 'Add Table', filter: 'Filter', collapse: 'Collapse All', + clear: 'Clear Filter', + no_results: 'No tables found matching your filter.', table: { fields: 'Fields', diff --git a/src/i18n/locales/es.ts b/src/i18n/locales/es.ts index 9625ccf3..79c2cc95 100644 --- a/src/i18n/locales/es.ts +++ b/src/i18n/locales/es.ts @@ -116,6 +116,9 @@ export const es: LanguageTranslation = { add_table: 'Agregar Tabla', filter: 'Filtrar', collapse: 'Colapsar Todo', + // TODO: Translate + clear: 'Clear Filter', + no_results: 'No tables found matching your filter.', table: { fields: 'Campos', diff --git a/src/i18n/locales/fr.ts b/src/i18n/locales/fr.ts index 5b9540c5..8a55b54f 100644 --- a/src/i18n/locales/fr.ts +++ b/src/i18n/locales/fr.ts @@ -116,6 +116,9 @@ export const fr: LanguageTranslation = { add_table: 'Ajouter une Table', filter: 'Filtrer', collapse: 'Réduire Tout', + // TODO: Translate + clear: 'Clear Filter', + no_results: 'No tables found matching your filter.', table: { fields: 'Champs', diff --git a/src/i18n/locales/gu.ts b/src/i18n/locales/gu.ts index 619783aa..c455173f 100644 --- a/src/i18n/locales/gu.ts +++ b/src/i18n/locales/gu.ts @@ -125,6 +125,9 @@ export const gu: LanguageTranslation = { add_table: 'ટેબલ ઉમેરો', filter: 'ફિલ્ટર', collapse: 'બધાને સકુચિત કરો', + // TODO: Translate + clear: 'Clear Filter', + no_results: 'No tables found matching your filter.', table: { fields: 'ફીલ્ડ્સ', diff --git a/src/i18n/locales/hi.ts b/src/i18n/locales/hi.ts index 5d3f07a2..7c088762 100644 --- a/src/i18n/locales/hi.ts +++ b/src/i18n/locales/hi.ts @@ -126,6 +126,9 @@ export const hi: LanguageTranslation = { add_table: 'तालिका जोड़ें', filter: 'फ़िल्टर', collapse: 'सभी को संक्षिप्त करें', + // TODO: Translate + clear: 'Clear Filter', + no_results: 'No tables found matching your filter.', table: { fields: 'फ़ील्ड्स', diff --git a/src/i18n/locales/id_ID.ts b/src/i18n/locales/id_ID.ts index 9ca8eb8e..0d4b2353 100644 --- a/src/i18n/locales/id_ID.ts +++ b/src/i18n/locales/id_ID.ts @@ -124,6 +124,9 @@ export const id_ID: LanguageTranslation = { add_table: 'Tambah Tabel', filter: 'Saring', collapse: 'Lipat Semua', + // TODO: Translate + clear: 'Clear Filter', + no_results: 'No tables found matching your filter.', table: { fields: 'Kolom', diff --git a/src/i18n/locales/ja.ts b/src/i18n/locales/ja.ts index 7f674645..fa1add4f 100644 --- a/src/i18n/locales/ja.ts +++ b/src/i18n/locales/ja.ts @@ -128,6 +128,9 @@ export const ja: LanguageTranslation = { add_table: 'テーブルを追加', filter: 'フィルタ', collapse: 'すべて折りたたむ', + // TODO: Translate + clear: 'Clear Filter', + no_results: 'No tables found matching your filter.', table: { fields: 'フィールド', diff --git a/src/i18n/locales/ko_KR.ts b/src/i18n/locales/ko_KR.ts index 4948167d..d8592a45 100644 --- a/src/i18n/locales/ko_KR.ts +++ b/src/i18n/locales/ko_KR.ts @@ -124,6 +124,9 @@ export const ko_KR: LanguageTranslation = { add_table: '테이블 추가', filter: '필터', collapse: '모두 접기', + // TODO: Translate + clear: 'Clear Filter', + no_results: 'No tables found matching your filter.', table: { fields: '필드', diff --git a/src/i18n/locales/mr.ts b/src/i18n/locales/mr.ts index 99df6b7f..e672fcea 100644 --- a/src/i18n/locales/mr.ts +++ b/src/i18n/locales/mr.ts @@ -127,6 +127,9 @@ export const mr: LanguageTranslation = { add_table: 'टेबल जोडा', filter: 'फिल्टर', collapse: 'सर्व संकुचित करा', + // TODO: Translate + clear: 'Clear Filter', + no_results: 'No tables found matching your filter.', table: { fields: 'फील्ड्स', diff --git a/src/i18n/locales/ne.ts b/src/i18n/locales/ne.ts index 400ab163..e3f155f4 100644 --- a/src/i18n/locales/ne.ts +++ b/src/i18n/locales/ne.ts @@ -124,6 +124,9 @@ export const ne: LanguageTranslation = { add_table: 'तालिका थप्नुहोस्', filter: 'फिल्टर', collapse: 'सबै लुकाउनुहोस्', + // TODO: Translate + clear: 'Clear Filter', + no_results: 'No tables found matching your filter.', table: { fields: 'क्षेत्रहरू', diff --git a/src/i18n/locales/pt_BR.ts b/src/i18n/locales/pt_BR.ts index 6d7fd5df..093d1f44 100644 --- a/src/i18n/locales/pt_BR.ts +++ b/src/i18n/locales/pt_BR.ts @@ -125,6 +125,9 @@ export const pt_BR: LanguageTranslation = { add_table: 'Adicionar Tabela', filter: 'Filtrar', collapse: 'Colapsar Todas', + // TODO: Translate + clear: 'Clear Filter', + no_results: 'No tables found matching your filter.', table: { fields: 'Campos', diff --git a/src/i18n/locales/ru.ts b/src/i18n/locales/ru.ts index 71752beb..5ef3db44 100644 --- a/src/i18n/locales/ru.ts +++ b/src/i18n/locales/ru.ts @@ -123,6 +123,9 @@ export const ru: LanguageTranslation = { add_table: 'Добавить таблицу', filter: 'Фильтр', collapse: 'Свернуть все', + // TODO: Translate + clear: 'Clear Filter', + no_results: 'No tables found matching your filter.', table: { fields: 'Поля', diff --git a/src/i18n/locales/te.ts b/src/i18n/locales/te.ts index 5fe19e4d..8ff75773 100644 --- a/src/i18n/locales/te.ts +++ b/src/i18n/locales/te.ts @@ -125,6 +125,9 @@ export const te: LanguageTranslation = { add_table: 'పట్టికను జోడించు', filter: 'ఫిల్టర్', collapse: 'అన్ని కూల్ చేయి', + // TODO: Translate + clear: 'Clear Filter', + no_results: 'No tables found matching your filter.', table: { fields: 'ఫీల్డులు', diff --git a/src/i18n/locales/tr.ts b/src/i18n/locales/tr.ts index d13ce666..f6abd042 100644 --- a/src/i18n/locales/tr.ts +++ b/src/i18n/locales/tr.ts @@ -124,6 +124,10 @@ export const tr: LanguageTranslation = { add_table: 'Tablo Ekle', filter: 'Filtrele', collapse: 'Hepsini Daralt', + // TODO: Translate + clear: 'Clear Filter', + no_results: 'No tables found matching your filter.', + table: { fields: 'Alanlar', nullable: 'Boş Bırakılabilir?', diff --git a/src/i18n/locales/uk.ts b/src/i18n/locales/uk.ts index 0fbf39f2..4cc0b591 100644 --- a/src/i18n/locales/uk.ts +++ b/src/i18n/locales/uk.ts @@ -125,6 +125,9 @@ export const uk: LanguageTranslation = { add_table: 'Додати таблицю', filter: 'фільтр', collapse: 'Згорнути все', + // TODO: Translate + clear: 'Clear Filter', + no_results: 'No tables found matching your filter.', table: { fields: 'поля', diff --git a/src/i18n/locales/vi.ts b/src/i18n/locales/vi.ts index 903f0a3f..4349dbf2 100644 --- a/src/i18n/locales/vi.ts +++ b/src/i18n/locales/vi.ts @@ -124,6 +124,9 @@ export const vi: LanguageTranslation = { add_table: 'Thêm bảng', filter: 'Lọc', collapse: 'Thu gọn tất cả', + // TODO: Translate + clear: 'Clear Filter', + no_results: 'No tables found matching your filter.', table: { fields: 'Trường', diff --git a/src/i18n/locales/zh_CN.ts b/src/i18n/locales/zh_CN.ts index 078f776e..82ac76db 100644 --- a/src/i18n/locales/zh_CN.ts +++ b/src/i18n/locales/zh_CN.ts @@ -121,6 +121,9 @@ export const zh_CN: LanguageTranslation = { add_table: '添加表', filter: '筛选', collapse: '全部折叠', + // TODO: Translate + clear: 'Clear Filter', + no_results: 'No tables found matching your filter.', table: { fields: '字段', diff --git a/src/i18n/locales/zh_TW.ts b/src/i18n/locales/zh_TW.ts index 996f9c6d..514be059 100644 --- a/src/i18n/locales/zh_TW.ts +++ b/src/i18n/locales/zh_TW.ts @@ -121,6 +121,9 @@ export const zh_TW: LanguageTranslation = { add_table: '新增表格', filter: '篩選', collapse: '全部摺疊', + // TODO: Translate + clear: 'Clear Filter', + no_results: 'No tables found matching your filter.', table: { fields: '欄位', diff --git a/src/pages/editor-page/side-panel/tables-section/tables-section.tsx b/src/pages/editor-page/side-panel/tables-section/tables-section.tsx index 2007a991..7541a273 100644 --- a/src/pages/editor-page/side-panel/tables-section/tables-section.tsx +++ b/src/pages/editor-page/side-panel/tables-section/tables-section.tsx @@ -1,7 +1,7 @@ import React, { useCallback, useMemo } from 'react'; import { TableList } from './table-list/table-list'; import { Button } from '@/components/button/button'; -import { Table, ListCollapse } from 'lucide-react'; +import { Table, ListCollapse, X } from 'lucide-react'; import { Input } from '@/components/input/input'; import type { DBTable } from '@/lib/domain/db-table'; @@ -88,6 +88,10 @@ export const TablesSection: React.FC = () => { setFilterText, ]); + const handleClearFilter = useCallback(() => { + setFilterText(''); + }, []); + return (
= () => { )} className="mt-20" /> + ) : filterText && filteredTables.length === 0 ? ( +
+
+ {t('side_panel.tables_section.no_results')} +
+ +
) : ( )}