nativescript-community / ui-material-components

Monorepo that contains all of the NativeScript Material Design plugins.
https://nativescript-community.github.io/ui-material-components/
Apache License 2.0
216 stars 80 forks source link

[MDTextField][MDTextView][Android] Helper seems not to work #435

Open cloudhx opened 1 year ago

cloudhx commented 1 year ago

I simply set property helper on both MDTextField and MDTextView, but the helper text doesn't show. Please see below code snippets and screenshots. Thank you for your support!

MDTextField

<FlexboxLayout>
          <MDTextField class="input" #email formControlName="email" helper="test" [hint]="'EMAIL' | translate" autocorrect="false"
            autocapitalizationType="none" returnKeyType="next" (returnPress)="password.focus()"
            (blur)="trimFormControlValue('email')" variant="outline" placeholderColor="#9196A1">
          </MDTextField>
        </FlexboxLayout>

The two small dots under the text field seem from the two t in word test 🤔 Screenshot_20230218-151129_navigator

MDTextView

<FlexboxLayout>
            <MDTextView class="incident-comment" variant="outline" placeholderColor="#9196A1" floating="true"
              [hint]="('Comment...' | translate) + (incidentType.id === 'OTHER' ? '*' : '')"
              helper="test" returnKeyType="next"
              (textChange)="onCommentChange($event)">
            </MDTextView>
          </FlexboxLayout>

Screenshot_20230218-152525_navigator

farfromrefug commented 1 year ago

@cloudhx are you enforcing TextField, TextView height? I tested here and if i dont enforce height i see the helper text. With TextView at least, if i set the height, then i dont see it

cloudhx commented 1 year ago

@farfromrefug I enforced height for TextView but not TextField. I think I also tried not enforcing height for TextView, it didn't show helper either. I will double check it and update the code and screenshot