I have an app built originally with Ionic 6, but has very recently been upgraded to Ionic 7. I have a number of select boxes that I have styled with the text displayed to the left and the arrow to the right.
This was fine until I just the other day when I upgraded to Ionic 7.6.0 and suddenly the arrow was being shown directly after the text despite my css formatting which had previously worked fine.
Some research indicated this to be caused by a change to Ionic two weeks ago where slots were added to, among other things, ion-select (feat(input, textarea, select): add start and end slots by amandaejohnston · Pull Request #28583 · ionic-team/ionic-framework · GitHub). The change added a new div with a class called select-wrapper-inner which I can no longer modify (don’t now how to) to fill the entire space available.
I was previously using this css in my .page.scss file to expand the container part, but this no longer works.
.value-child-select {
flex: 1;
display: flex;
...
&::part(container) {
width: 100%;
}
}
This new div was unfortunately implemented without a part attribute which would have made this an easy situation to fix. I could have overridden that part element as well.
Does anyone know if it possible to add css to my code that will modify the shadow dom for select-wrapper-inner class? If I do this and manually set the width to 100% in developer tools in the browser, I get the desired effect. Unfortunately, I don’t know if it’s possible in my local css code or the global.scss file. Any suggestions?