From 73f317c1eefac708e619cc4e0c1341b53c61e8a4 Mon Sep 17 00:00:00 2001 From: Imran Sayed Date: Tue, 23 Jan 2024 21:21:36 -0600 Subject: [PATCH] Update search' --- package.json | 2 +- src/multi-select/tp-multi-select-search.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 645a006..b5f44b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@travelopia/web-components", - "version": "0.5.8", + "version": "0.5.9", "description": "Accessible web components for the modern web", "files": [ "dist" diff --git a/src/multi-select/tp-multi-select-search.ts b/src/multi-select/tp-multi-select-search.ts index aab9e31..eab4445 100644 --- a/src/multi-select/tp-multi-select-search.ts +++ b/src/multi-select/tp-multi-select-search.ts @@ -112,6 +112,10 @@ export class TPMultiSelectSearchElement extends HTMLElement { * Set focus on the search field. */ focus(): void { + // When it's focused, use search change to ensure the results are refreshed. + this.handleSearchChange(); + + // Focus on input. this.querySelector( 'input' )?.focus(); } }