Nativebase: clearText of the Input on InputGroup

Created on 25 Nov 2016  路  4Comments  路  Source: GeekyAnts/NativeBase

Is it possible clear text of the Input from an InputGroup?

Most helpful comment

The clear method doesn't seem to be available on the NativeBase component.

I have to do this :

<Input ref={(ref) => { this.input = ref }} />
this.input._root.clear();

Am I missing something ? I use NativeBase > 2.0

All 4 comments

You can use clear() function from react-native.

The clear method doesn't seem to be available on the NativeBase component.

I have to do this :

<Input ref={(ref) => { this.input = ref }} />
this.input._root.clear();

Am I missing something ? I use NativeBase > 2.0

@alexsegura did you do something like

if (this.input != null) {
// ...
}

? I tried and the clear function works

Facing the same issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eggybot picture eggybot  路  3Comments

agersoncgps picture agersoncgps  路  3Comments

chetnadaffodil picture chetnadaffodil  路  3Comments

muthuraman007 picture muthuraman007  路  3Comments

georgemickael-b picture georgemickael-b  路  3Comments