Coder Social home page Coder Social logo

Comments (6)

ZeeshanTamboli avatar ZeeshanTamboli commented on July 16, 2024 1

I think I know why this broke. But before explaining, @TangMichael, why are you applying the height style when the rows prop already determines the textarea height using the rows value?

from material-ui.

DiegoAndai avatar DiegoAndai commented on July 16, 2024

@ZeeshanTamboli this broke in #40789 and, for some reason #41369 didn't fix it. May I ask you to take a look? Weirdly, the height seems to be multiplied x4 🤔

from material-ui.

TangMichael avatar TangMichael commented on July 16, 2024

@ZeeshanTamboli We used the height style to have a more precise size to match the designs to the pixels. Can the rows value be used to do the same?

After seeing your comments with the rows, I can see that the height of the style is multiplied by the rows number which is why on v5.15.11+, the height is 400 when I have rows set to 4 and the style of the height set to 100.

from material-ui.

ZeeshanTamboli avatar ZeeshanTamboli commented on July 16, 2024

If you want the height to match the design exactly, why are you using the rows prop?

from material-ui.

TangMichael avatar TangMichael commented on July 16, 2024

The codebase already contained those two props and it worked fine so it was kept like this. We only noticed this issue when upgrading the library version.

I can remove one of the other if that fixes the issue. Would you say this is intended behaviour starting from 5.15.11+?

from material-ui.

ZeeshanTamboli avatar ZeeshanTamboli commented on July 16, 2024

Would you say this is intended behaviour starting from 5.15.11+?

This is the correct behavior. It was incorrect before 5.15.11, and the new logic in #40789 exposed this improper prop usage. Either provide a static height using the height style or let the textarea determine its height using the rows attribute. The combination of both doesn't make sense. I think we can close this issue.

from material-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.