I need to add an (required) to my ion-input label. I would like to use additional HTML for the (required) so I’ve tried to use
The problem is that with an ion-input with labelPlacement stacked the label is broken.
Before
<ion-input
name="name"
class="nameInput"
mode="md"
label={i18n('name')}
required
type="text"
fill="outline"
labelPlacement="stacked"
placeholder={i18n('insert-name')}
onInput={(e) => this.handleChange(e)}>
</ion-input>
After
<ion-input
name="name"
class="nameInput"
mode="md"
// label={i18n('name')}
required
type="text"
fill="outline"
labelPlacement="stacked"
placeholder={i18n('insert-name')}
onInput={(e) => this.handleChange(e)}>
<div slot="label">{i18n('name')} <ion-text color="danger">(Required)</ion-text></div>
</ion-input>
There is no way to use the slot with stacked label?