Ion-searchbar between two buttons inside of ion-toolbar

I’m creating a modal to search items and I want ion-searchbar are on ion-toolbar with two buttons: cancel to go back without parameters (on left side) and add to add a new item and send back a parameter (right side).
I did the nex html:

	<ion-toolbar color='primary'>
		<ion-buttons start>
			<button ion-button icon-only (click)='onCancel()'>
				<ion-icon name="close"></ion-icon>
		<ion-searchbar (input)="onSearchInput()"></ion-searchbar>
		<ion-buttons end>
			<button ion-button icon-only (click)='onDismiss()'>
				<ion-icon name="add"></ion-icon>

With this I would expect to get the desired result, but no. Actually I’m getting this:

I’m looking for move cancel button (X) to left side.
Another thing, how change ion-searchbar’s placeholder to spanish?

1 Like

use left instead of start and right instead of end. Because start end behaves differently on Android then you might expect. You can read about those properties over here in the documentation: For the placeholder, just add placeholder=“mySpanishSentence” to the ion-searchbar. That should work :slight_smile:


I really, really appreciate your help:

1 Like