My solution was to bind a function to the ionInput
event, adding a custom class name…
menuFocusMode(ev){
let el=document.getElementsByTagName('ion-searchbar');
el[0].classList.add('MY-CUSTOM-CLASS')
}
… then update the scss file for my page template…
.searchbar-ios.searchbar-show-cancel.MY-CUSTOM-CLASS .searchbar-ios-cancel {
display: block;
padding-left:8px;
}
This is useful for my needs, since my search results bring up a custom UI, meaning the input field loses focus
as soon as the user starts interacting with buttons (which normally causes the CANCEL button to disappear). Hope this helps someone else.