Nativebase: Support success / error / iconRight for forms

Created on 14 Dec 2016  路  6Comments  路  Source: GeekyAnts/NativeBase

Hi,

as shown in the documentation (http://nativebase.io/docs/v0.5.13/components#successInputTextbox) you can show the validation result of a InputTextbox using the properties success and error or with icons on the right side.

But this great way to indicate errors is not possibe, when using forms.
Would be nice if forms also support this feature, as their input is usually validated somehow.

Most helpful comment

{(this.state.success) && <Icon name='ios-checkmark-circle' />}
This should work for you.

All 6 comments

It needs to be handled outside NativeBase. At the moment, NativeBase is meant for UI components only and the logic needs to be implemented in your code.

I think you misunderstood me. What I am missing, is the option to have a success / error property (which render the bottomborder accordingly) for forms as well as an icon on the right side of a form input. From my point of view, this is UI related.

{(this.state.success) && <Icon name='ios-checkmark-circle' />}
This should work for you.

@wochinge The success / error prop changes the border color of textbox
And not icons or anything else related to textbox
You can add your custom code in case if you wish to have some enhanced features.

Thanks for your help 馃憤

I can't make it work.. seems like it doesn't re-render..

Was this page helpful?
0 / 5 - 0 ratings

Related issues

agersoncgps picture agersoncgps  路  3Comments

eggybot picture eggybot  路  3Comments

sihemhssine picture sihemhssine  路  3Comments

Bundas picture Bundas  路  3Comments

omerdn1 picture omerdn1  路  3Comments