Skip to content

Commit eb5eed3

Browse files
committed
feat: set onChange to protected to allow override of all callbacks
1 parent 4b6cf65 commit eb5eed3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/uui-input/lib/uui-input.element.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -264,14 +264,14 @@ export class UUIInputElement extends FormControlMixin(LitElement) {
264264
return this._input;
265265
}
266266

267-
protected _onInput(e: Event) {
267+
protected onInput(e: Event) {
268268
this.value = (e.target as HTMLInputElement).value;
269269

270270
// TODO: Do we miss an input event?
271271
// No, this event is already composed and bubbles, so th enative one just goes out and works. Change is not though. (see more https://html.spec.whatwg.org/multipage/input.html#common-input-element-events)
272272
}
273273

274-
private _onChange() {
274+
protected onChange() {
275275
this.pristine = false;
276276
this.dispatchEvent(new UUIInputEvent(UUIInputEvent.CHANGE));
277277
}
@@ -297,8 +297,8 @@ export class UUIInputElement extends FormControlMixin(LitElement) {
297297
.disabled=${this.disabled}
298298
?required=${this.required}
299299
?readonly=${this.readonly}
300-
@input=${this._onInput}
301-
@change=${this._onChange} />
300+
@input=${this.onInput}
301+
@change=${this.onChange} />
302302
${this.renderAppend()}
303303
`;
304304
}

0 commit comments

Comments
 (0)