Skip to content

Commit a1d64e5

Browse files
committed
Add readonly flag
1 parent 8a8260a commit a1d64e5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/components/modal/modal-with-toasts-example.element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class UUIModalWithToastsExampleElement extends LitElement {
2424
private _dialogCounter = 0;
2525
private _messageCounter = 0;
2626

27-
private _onModalOpen = () => {
27+
private readonly _onModalOpen = () => {
2828
const panel = this.shadowRoot?.getElementById('ai-chat-panel');
2929
if (panel?.matches(':popover-open')) {
3030
panel.hidePopover();

src/components/modal/modal.element.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ export class UUIModalElement extends LitElement {
100100
this.remove();
101101
}
102102

103-
private _onKeydown = (e: KeyboardEvent) => {
103+
private readonly _onKeydown = (e: KeyboardEvent) => {
104104
if (e.key === 'Escape' && this.index === 0) {
105105
this.close();
106106
}
107107
};
108108

109-
private _onFocusTrap = (e: FocusEvent) => {
109+
private readonly _onFocusTrap = (e: FocusEvent) => {
110110
if (this.index !== 0) return;
111111
if (!this._popoverElement?.contains(e.target as Node)) {
112112
this._popoverElement?.focus();

0 commit comments

Comments
 (0)