fix(dees-input-list,dees-icon): preserve input focus after list updates and make icons ignore pointer events
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@design.estate/dees-catalog',
|
||||
version: '3.61.1',
|
||||
version: '3.61.2',
|
||||
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
|
||||
}
|
||||
|
||||
@@ -665,11 +665,13 @@ export class DeesInputList extends DeesInputBase<DeesInputList> {
|
||||
this.currentCandidateIndex = -1;
|
||||
this.matchingCandidates = [];
|
||||
this.validationText = '';
|
||||
|
||||
const input = this.shadowRoot?.querySelector('.add-input') as HTMLInputElement;
|
||||
if (input) { input.value = ''; input.focus(); }
|
||||
|
||||
this.emitChange();
|
||||
|
||||
// Re-focus input after Lit re-renders
|
||||
this.updateComplete.then(() => {
|
||||
const input = this.shadowRoot?.querySelector('.add-input') as HTMLInputElement;
|
||||
if (input) { input.value = ''; input.focus(); }
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -708,15 +710,13 @@ export class DeesInputList extends DeesInputBase<DeesInputList> {
|
||||
this.value = [...this.value, trimmedValue];
|
||||
this.inputValue = '';
|
||||
this.validationText = '';
|
||||
|
||||
// Clear the input
|
||||
const input = this.shadowRoot?.querySelector('.add-input') as HTMLInputElement;
|
||||
if (input) {
|
||||
input.value = '';
|
||||
input.focus();
|
||||
}
|
||||
|
||||
this.emitChange();
|
||||
|
||||
// Re-focus input after Lit re-renders
|
||||
this.updateComplete.then(() => {
|
||||
const input = this.shadowRoot?.querySelector('.add-input') as HTMLInputElement;
|
||||
if (input) { input.value = ''; input.focus(); }
|
||||
});
|
||||
}
|
||||
|
||||
private startEdit(index: number) {
|
||||
|
||||
@@ -338,6 +338,7 @@ export class DeesIcon extends DeesElement {
|
||||
justify-content: center;
|
||||
line-height: 1;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Improve rendering performance */
|
||||
|
||||
Reference in New Issue
Block a user