nativescript-community/ui-material-components

[MDTextView][Android] Setting height of the component doesn't work

cloudhx opened this issue · 8 comments

Thanks for this great package! We're working on Android and trying to replace the NS ones with the material ones as much as possible. They all work as expected but with one minor issue on MDTextView. We set NS TextView with a height to mimic the Textarea in the web. This seems not work for MDTextView. No matter how I set the height via css or property, it always show one line height when empty.

<MDTextView #incidentComment class="incident-comment" height="300" variant="outline" placeholderColor="#9196A1"
            hint="Comment..." returnKeyType="next" (textChange)="onIncidentCommentChange($event)">
</MDTextView>

I would like to know if I'm doing something wrong or this component currently doesn't support the height.

Thank you.

@cloudhx just to be clear your title say card but the actual issue is with mdtextview? Does it work on ios?

@farfromrefug Thanks for your quick reply. Sorry about the title, I've changed it to [MDTextView].

We haven't had an ios version yet, so cannot tell about that, I'll provide a few screenshots with both MDTextView and TextView and the code for your reference, thanks again for the support!

Here comes the screenshot, the red one is the NS TextView, from the code you can also see I set both to height=300, but only NS TextView works. It seems MDTextView does set a heigh of 300 (the space between two components), but not the visible part.

<GridLayout rows="auto, auto" class="incident-comment-container">
  <MDTextView #incidentComment height="300" class="incident-comment" variant="outline" placeholderColor="#9196A1" hint="Comment..." returnKeyType="next">
  </MDTextView>
  <TextView row="1" class="incident-comment" height="300" hint="Enter some text..." >
  </TextView>
</GridLayout>

Screenshot_20230131_111325_navigator

@cloudhx thanks a lot for the details! I ll see what i can do as soon as possible

Sounds great! Thank you!

@cloudhx you can update the packages it shoudl be fixed now!

@farfromrefug Thanks! I will do that today and get back to you.

@farfromrefug Sorry for the late reply, I have tested @nativescript-community/ui-material-textview@7.0.40 and it works like a charm, thank you so much for having the fix so quickly 💯 , it's really a great plugin for NativeScript!