From 9a150411255774eb93bda75f1b0d634859d55b5b Mon Sep 17 00:00:00 2001 From: Pyry Koivisto Date: Mon, 7 Oct 2024 10:27:16 +0300 Subject: [PATCH] SHARED:AKR:OTR:VKT:YKI(Frontend): Fix native select component [deploy] --- frontend/packages/akr/package.json | 2 +- frontend/packages/otr/package.json | 2 +- frontend/packages/shared/CHANGELOG.MD | 5 +++++ frontend/packages/shared/package.json | 2 +- .../src/components/NativeSelect/NativeSelect.tsx | 4 ++-- frontend/packages/vkt/package.json | 2 +- frontend/packages/yki/package.json | 2 +- frontend/yarn.lock | 10 +++++----- 8 files changed, 17 insertions(+), 12 deletions(-) diff --git a/frontend/packages/akr/package.json b/frontend/packages/akr/package.json index 3cd18d401..c493483a3 100644 --- a/frontend/packages/akr/package.json +++ b/frontend/packages/akr/package.json @@ -22,6 +22,6 @@ "akr:tslint": "yarn g:tsc --pretty --noEmit" }, "dependencies": { - "shared": "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.11.3" + "shared": "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.11.4" } } diff --git a/frontend/packages/otr/package.json b/frontend/packages/otr/package.json index f95787feb..6983d5d54 100644 --- a/frontend/packages/otr/package.json +++ b/frontend/packages/otr/package.json @@ -25,6 +25,6 @@ "otr:tslint": "yarn g:tsc --pretty --noEmit" }, "dependencies": { - "shared": "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.11.3" + "shared": "npm:@opetushallitus/kieli-ja-kaantajatutkinnot.shared@1.11.4" } } diff --git a/frontend/packages/shared/CHANGELOG.MD b/frontend/packages/shared/CHANGELOG.MD index 6a244f1a8..db4d7c429 100644 --- a/frontend/packages/shared/CHANGELOG.MD +++ b/frontend/packages/shared/CHANGELOG.MD @@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Released] +## [1.11.4] - 2024-10-07 + +### Fixed +- Fixed bug introduced in v.1.11.1: NativeSelect and NativeSelectWithLabel didn't display chosen value correctly + ## [1.11.3] - 2024-09-18 ### Added diff --git a/frontend/packages/shared/package.json b/frontend/packages/shared/package.json index d6aa2c25b..048f83414 100644 --- a/frontend/packages/shared/package.json +++ b/frontend/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@opetushallitus/kieli-ja-kaantajatutkinnot.shared", - "version": "1.11.3", + "version": "1.11.4", "description": "Shared Frontend Package", "exports": { "./components": "./src/components/index.tsx", diff --git a/frontend/packages/shared/src/components/NativeSelect/NativeSelect.tsx b/frontend/packages/shared/src/components/NativeSelect/NativeSelect.tsx index 5c836a7d4..436a31ce0 100644 --- a/frontend/packages/shared/src/components/NativeSelect/NativeSelect.tsx +++ b/frontend/packages/shared/src/components/NativeSelect/NativeSelect.tsx @@ -11,7 +11,7 @@ import { ComboBoxOption } from '../../interfaces'; import { Text } from '../Text/Text'; export interface CustomNativeSelectProps - extends BaseSelectProps { + extends Omit, 'value'> { 'data-testid'?: string; helperText?: string; showError?: boolean; @@ -27,7 +27,7 @@ const CustomSelect = ({ ...rest }: CustomNativeSelectProps) => { const options = [{ label: placeholder, value: '' }, ...values]; - const inputValue = value && value.value ? value : ''; + const inputValue = value && value.value ? value.value : ''; return (