Reputation: 468
I have this element:
<SearchBar
hint="Search..."
textFieldHintColor="whitesmoke"
keyboardType="TYPE_CLASS_NUMBER"
>
</SearchBar>
But still showing normal keyboard. How can I achieve this?
Upvotes: 0
Views: 109
Reputation: 21908
keyboardType
is not a valid attribute on SearchBar. But you may able to achieve it by calling setInputType(...) on the native view.
HTML
<SearchBar
hint="Search..."
textFieldHintColor="whitesmoke"
(loaded)="onLoaded($event)"
>
</SearchBar>
TS
onLoaded(event) {
if (event.object.android) {
event.object.android.setInputType(android.text.InputType.TYPE_CLASS_NUMBER);
}
}
Upvotes: 1