From 8a04a5e8c0bb3b72a2fbb90822600f6b8feefc06 Mon Sep 17 00:00:00 2001 From: tshimber <110041439+tshimber@users.noreply.github.com> Date: Tue, 12 Nov 2024 11:46:28 +0100 Subject: [PATCH] fix(drop-down): fixes hidden input in dropdown-select with null check (#2361) --- .../src/components/dropdown-select/dropdown-select.tsx | 3 +++ packages/components/src/html/dropdown-select.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/components/src/components/dropdown-select/dropdown-select.tsx b/packages/components/src/components/dropdown-select/dropdown-select.tsx index 2c8e429f00..600d644165 100644 --- a/packages/components/src/components/dropdown-select/dropdown-select.tsx +++ b/packages/components/src/components/dropdown-select/dropdown-select.tsx @@ -329,6 +329,9 @@ export class DropdownSelect { } updateInputHidden(value: string = this.value): void { + if (!this.hiddenInput) { + return; + } this.hiddenInput.value = value; } diff --git a/packages/components/src/html/dropdown-select.html b/packages/components/src/html/dropdown-select.html index bbb0ebf20b..6a66117b48 100644 --- a/packages/components/src/html/dropdown-select.html +++ b/packages/components/src/html/dropdown-select.html @@ -23,7 +23,7 @@ - +