diff --git a/core/src/components/searchbar/searchbar.tsx b/core/src/components/searchbar/searchbar.tsx index 83af4f082a..139e073c99 100644 --- a/core/src/components/searchbar/searchbar.tsx +++ b/core/src/components/searchbar/searchbar.tsx @@ -420,24 +420,29 @@ export class Searchbar implements ComponentInterface { } render() { + const { cancelButtonText } = this; const animated = this.animated && config.getBoolean('animated', true); const mode = getIonMode(this); const clearIcon = this.clearIcon || (mode === 'ios' ? 'close-circle' : 'close-sharp'); const searchIcon = this.searchIcon || (mode === 'ios' ? 'search-outline' : 'search-sharp'); + const shouldShowCancelButton = this.shouldShowCancelButton(); const cancelButton = (this.showCancelButton !== 'never') && ( @@ -481,7 +486,7 @@ export class Searchbar implements ComponentInterface { {mode === 'md' && cancelButton} - +