I want to remove the inbuilt grey small caret from ion-select
, and use my
custom caret(arrow) instead.
Code:
ion-select {
color: grey
If there are several ion-select items, here is a sample.
TS Code :
ionViewDidEnter() {
// ion-select customizing
const ionSelects = document.querySelectorAll('ion-select');
let img = null;
ionSelects.forEach((ionSelect) => {
const selectIconInner = ionSelect.shadowRoot.querySelector('.select-icon').querySelector('.select-icon-inner');
if(selectIconInner){
selectIconInner.attributes.removeNamedItem("class");
img = document.createElement("img");
img.src = "./new-arrow-down-image.svg";
img.style.width = "12px";
img.style.paddingTop = "3px";
img.style.paddingLeft = "4px";
img.style.color = "black";
img.style.opacity = "0.5";
selectIconInner.appendChild(img);
}
});
}