material-table icon indicating copy to clipboard operation
material-table copied to clipboard

How to position the add row to the first position instead the last position on the table?

Open VictorPotes opened this issue 6 years ago • 2 comments

Hi team! I need to position the add row on the first position on the table, but I haven't found the way in the documentation.

  • Please include a demo of the issue/behavior/question you have

This is how appears now:

image

This is how I need the add row appears:

image

  • Please try to be as detailed as possible

When I click on the add button, the add row appears in the last position on the table, the problem is when there are around 20 rows in the table, the user has to scrolldown to add the new row. What I need is that add row appears in the first position on the table, thus if there are a lot of rows in the table, the user doesn't need to scrolldown to add a new row.

Thank you so much for your support.

VictorPotes avatar Sep 06 '20 07:09 VictorPotes

I think the options.addRowPosition with first value is what you’re looking for.

See more: https://material-table.com/#/docs/all-props

mackankowski avatar Sep 06 '20 16:09 mackankowski

@mackankowski That's exactly what I was looking for, thank you so much!

VictorPotes avatar Sep 06 '20 23:09 VictorPotes