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

Method onAfterRendering

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

Source from the content-addressed store, hash-verified

816 }
817
818 onAfterRendering() {
819 if (this.showSuggestions && this.Suggestions?._getPicker()) {
820 this._listWidth = this.Suggestions._getListWidth();
821
822 // disabled ItemNavigation from the list since we are not using it
823 this.Suggestions._getList()._itemNavigation._getItems = () => [];
824 }
825
826 if (this._performTextSelection) {
827 // this is required to syncronize lit-html input's value and user's input
828 // lit-html does not sync its stored value for the value property when the user is typing
829 // if (innerInput.value !== this._innerValue) {
830 // innerInput.value = this._innerValue;
831 // }
832
833 if (this.typedInValue.length && this.value.length) {
834 this._adjustSelectionRange();
835 }
836
837 this.fireDecoratorEvent("type-ahead");
838 }
839
840 this._performTextSelection = false;
841
842 if (!arraysAreEqual(this._valueStateLinks, this.linksInAriaValueStateHiddenText)) {
843 this._removeLinksEventListeners();
844 this._addLinksEventListeners();
845 this._valueStateLinks = this.linksInAriaValueStateHiddenText;
846 }
847 }
848
849 _adjustSelectionRange() {
850 const innerInput = this.getInputDOMRefSync()!;

Callers

nothing calls this directly

Calls 7

_adjustSelectionRangeMethod · 0.95
arraysAreEqualFunction · 0.85
_getListWidthMethod · 0.80
_getPickerMethod · 0.45
_getListMethod · 0.45

Tested by

no test coverage detected