MCPcopy Create free account
hub / github.com/UI5/webcomponents / _clear

Method _clear

packages/main/src/Input.ts:1227–1244  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1225 }
1226
1227 _clear() {
1228 const valueBeforeClear = this.value;
1229 this.value = "";
1230 const prevented = !this.fireDecoratorEvent(INPUT_EVENTS.INPUT, { inputType: "" });
1231
1232 if (prevented) {
1233 this.value = valueBeforeClear;
1234 return;
1235 }
1236
1237 this.typedInValue = "";
1238
1239 if (!this._isPhone) {
1240 this.fireResetSelectionChange();
1241 this.focus();
1242 this._focusedAfterClear = true;
1243 }
1244 }
1245
1246 _iconMouseDown() {
1247 this._clearIconClicked = true;

Callers

nothing calls this directly

Calls 2

focusMethod · 0.45

Tested by

no test coverage detected