on 10-03-2021 1:23 PM
I'm extending a standard fiori list application and there is an input field( Input Contol) whose value is mapped to OData coming from backend. My requirement is to select(highlight) the value of this input field upon mouse click so that its easier for users to input a new numeric value( requirement.jpg) in all devices. How to achieve this considering that this is a Fiori extension.
Hi,
I managed to get this requirement done by placing the below code in onInit in my controller. However, I dont know whether there is any better approach.
onInit: function() {
// To select value of Input field on mouse click
window.sap.m.Input.prototype.onfocusin = function(e) {
this.$().addClass("sapMInputFocused");
document.getElementById(e.target.id).setAttribute("onclick",
"this.select()");
};
},
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
11 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.