From 5b75ce3c6ffde9fec7f941eb2010c579abb78319 Mon Sep 17 00:00:00 2001 From: gurikov maxim Date: Wed, 18 Sep 2024 17:40:45 +0500 Subject: [PATCH 1/3] added checkBox in place of Button --- .../FieldSelector/FieldSelector.tsx | 36 ++++++++++--------- .../stories/Commons/FieldSelector.stories.tsx | 13 +++++++ 2 files changed, 32 insertions(+), 17 deletions(-) diff --git a/db-viewer-ui/src/Components/FieldSelector/FieldSelector.tsx b/db-viewer-ui/src/Components/FieldSelector/FieldSelector.tsx index 504a54df..f70a2800 100644 --- a/db-viewer-ui/src/Components/FieldSelector/FieldSelector.tsx +++ b/db-viewer-ui/src/Components/FieldSelector/FieldSelector.tsx @@ -21,7 +21,7 @@ interface FieldSelectorProps { showSelectAllButton?: boolean; } -function filterFieldDefintionsByText(fieldDefinitions: FieldDefinition[], text: string): FieldDefinition[] { +function filterFieldDefinitionsByText(fieldDefinitions: FieldDefinition[], text: string): FieldDefinition[] { if (!text) { return fieldDefinitions; } @@ -80,27 +80,29 @@ export function FieldSelector({ ); }; - const fieldDefinitionsFiltered = filterFieldDefintionsByText(fieldDefinitions, searchText); + const fieldDefinitionsFiltered = filterFieldDefinitionsByText(fieldDefinitions, searchText); const nothingToDisplay = Ничего не найдено; const allFieldsSelected = isAllFieldSelected(fieldDefinitionsFiltered); return (
- } - value={searchText} - width={300} - onValueChange={setSearchText} - /> - {showSelectAllButton && ( -
handleSelectAll(fieldDefinitionsFiltered)} - className={jsStyles.selectAll(theme)}> - {allFieldsSelected ? "Снять выбор с найденных" : "Выбрать все найденные"} -
- )} + + } + value={searchText} + width={300} + onValueChange={setSearchText} + /> + {showSelectAllButton && ( + handleSelectAll(fieldDefinitionsFiltered)} + checked={allFieldsSelected}> + Все найденные + + )} + {fieldDefinitionsFiltered.length === 0 ? {nothingToDisplay} : null} diff --git a/db-viewer-ui/stories/Commons/FieldSelector.stories.tsx b/db-viewer-ui/stories/Commons/FieldSelector.stories.tsx index e586a352..b8d6cb94 100644 --- a/db-viewer-ui/stories/Commons/FieldSelector.stories.tsx +++ b/db-viewer-ui/stories/Commons/FieldSelector.stories.tsx @@ -19,6 +19,19 @@ export const Default = (): React.ReactElement => ( /> ); +export const WithSelectAll = (): React.ReactElement => ( + +); + export const LongStrings = (): React.ReactElement => ( Date: Mon, 23 Sep 2024 14:26:57 +0500 Subject: [PATCH 2/3] tryed to fix actions --- .github/workflows/actions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 70f2077f..981c1148 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -55,7 +55,7 @@ jobs: - name: Check front code run: yarn --cwd db-viewer-ui lint - - name: Build docker-compose environment + - name: Build docker compose environment run: docker compose up -d --wait - name: Run db-viewer api @@ -69,7 +69,7 @@ jobs: - name: Stop docker containers if: always() - run: docker rm -f db-viewer-api && docker-compose down + run: docker rm -f db-viewer-api && docker compose down - name: Upload artifacts uses: actions/upload-artifact@v3 From 5246ea5422b651dcfb3c549299755ef6f8fae6d7 Mon Sep 17 00:00:00 2001 From: gurikov maxim Date: Tue, 24 Sep 2024 13:54:48 +0500 Subject: [PATCH 3/3] changed version to prerelease --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 6dc13cc6..01e996f4 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "version": "1.8", + "version": "1.8-prerelease.4", "assemblyVersion": { "precision": "build" },