Maazsid
September 7, 2020, 12:49pm
1
<ion-textarea [disabled] = "buttonDisabled" [(ngModel)] = "ServiceDetails.description" rows = "4" class = "input-textarea-custom" type= "text" name="description" placeholder=""></ion-textarea>
.input-textarea-custom:disabled{
--background : #ccc;
opacity: 0.7;
}
Hi, am unable to customize the disabled pseudo class of ion-textarea…
I also tried putting it in global.scss, but no luck
Updated to anyone who is also facing same issue,
use the setFocus Method available in ion-textarea api to set the pseudo class ‘focus’ and ‘disabled’ for both ion-input and ion-textarea,
Example :
// Html
<ion-input [style] = 'inputStyle' #myinput (focusout) ='cursorLeft()' (focusin) = 'inputFocus(myinput.setFocus())' class = "input-custom" type= "text" >
</ion-input>
// TS
inputFocus(data:any){
data.then(() => {
this.inputStyle = { border: '2px solid #5E63D8'};
})
}
cursorLeft(){
this.inputStyle = { border: '0.5px solid black'};
}