fix(sidebar): restore search input focus after clearing the sidebar search
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2026-04-12 - 3.8.2 - fix(sidebar)
|
||||||
|
restore search input focus after clearing the sidebar search
|
||||||
|
|
||||||
|
- Updates the sidebar clearSearch behavior to focus the .search-input element after resetting the query and dispatching searchChanged.
|
||||||
|
- Improves search usability by letting users continue typing immediately after clearing the current search.
|
||||||
|
|
||||||
## 2026-04-12 - 3.8.1 - fix(build)
|
## 2026-04-12 - 3.8.1 - fix(build)
|
||||||
migrate smart config and update build tooling for latest tsbundle and TypeScript defaults
|
migrate smart config and update build tooling for latest tsbundle and TypeScript defaults
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@design.estate/dees-wcctools',
|
name: '@design.estate/dees-wcctools',
|
||||||
version: '3.8.1',
|
version: '3.8.2',
|
||||||
description: 'A set of web component tools for creating element catalogues, enabling the structured development and documentation of custom elements and pages.'
|
description: 'A set of web component tools for creating element catalogues, enabling the structured development and documentation of custom elements and pages.'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -867,6 +867,8 @@ export class WccSidebar extends DeesElement {
|
|||||||
private clearSearch() {
|
private clearSearch() {
|
||||||
this.searchQuery = '';
|
this.searchQuery = '';
|
||||||
this.dispatchEvent(new CustomEvent('searchChanged', { detail: this.searchQuery }));
|
this.dispatchEvent(new CustomEvent('searchChanged', { detail: this.searchQuery }));
|
||||||
|
const input = this.shadowRoot.querySelector('.search-input') as HTMLInputElement;
|
||||||
|
if (input) input.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
private handleMenuScroll(e: Event) {
|
private handleMenuScroll(e: Event) {
|
||||||
|
|||||||
Reference in New Issue
Block a user