MudTextInput: Add AutoGrow feature (#7631)#7644
Conversation
|
Can someone with access to the pipeline re-run the tests? It seems that the runtime itself failed when executing the tests. |
Some fixes MudTextInput: Implement AutoGrow feature (MudBlazor#7631)
75bd561 to
3130db8
Compare
|
@fondraco adding you here, since you gave feedback on the issue, for some reason I can't add you to review |
|
Hmm, the test still fails so I guess something got broken? Does the test locally works? I can only look at it tmr |
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #7644 +/- ##
=======================================
Coverage 90.57% 90.57%
=======================================
Files 427 427
Lines 15225 15233 +8
=======================================
+ Hits 13790 13798 +8
Misses 1435 1435
☔ View full report in Codecov by Sentry. |
|
@fondraco The testing issues have been resolved. |
henon
left a comment
There was a problem hiding this comment.
LGTM, only the ambiguity about which value for MaxLines means no maximum should be resolved or documented.
|
I will add it to the documentation. If MaxLines is not specified, it defaults to 0 and therefore no max lines will be applied. |
|
OK, maybe as a note in the general description of MudInput? |
|
@henon How about the following property description: "If AutoGrow is set to true, the input element will not grow bigger than MaxLines lines. If MaxLines is set to 0 or less, the property will be ignored"? |
|
Clear to me. |
|
@henon @ScarletKuro Done. Regarding the maximum characters issue I could add something like this (the text is just a draft): But I'm not sure if that's MudBlazor's responsibility to inform users about possible issues related to Blazor Server. |
|
You read my mind. If you could find a way to link to the issue #7263 on github then it would be perfect. |
|
Maybe put the notice below the multiline examples |
|
LGTM
Well, not really, but people do create a lot of github issues that are not related to MudBlazor, like "for loop doesn't work with MudBlazor components" when it's a C# behavior and if we can decrease the workload with some advices, I'm only up for such tips and tricks. @henon what do you think? |
|
Thanks @AntMaster7, it looks good. |
|
Hi @henon , We're using MudBlazor and noticed the AutoGrow feature we need has a closed PR but isn't in an official release yet. Could you share any plans for its release date? Thank you! |
|
Thanks for the reminder, we simply forgot to do a release. It has been released now: https://github.com/MudBlazor/MudBlazor/releases/tag/v6.11.1 |
* MudTextInput: Implement AutoGrow feature (MudBlazor#7631) Co-authored-by: Samuel Egger <[email protected]>


Description
Resolves #7631
By implementing an AutoGrow and MaxLines property on the MudTextField. This feature allows for the input field to grow and shrink automatically when the number of lines changes. This feature can even be seen here on github when trying to create new comments. I have update the documentation to showcase this new feature.
How Has This Been Tested?
Unit tests did not seem feasible in this case. The changes do not alter any logic and merely invoke JavaScript functions that alter the height of the textarea using the elements scroll offset. Although I could probably create a Unit Test that checks if the JavaScript method is invoked after the component has been rendered when the AutoGrow property is set to true. But I am not sure if thats on overkill.
I did execute the tests manually on the latest version of Microsoft Edge. I tested both the server and web assembly version. I temporarily altered the example to update the bound text value with a button click to check if the autogrow feature works too in this scenario.
Types of changes
Checklist:
dev).