Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dense padding prop does not apply to EditRow #1908

Closed
LeanderCoevoet opened this issue May 12, 2020 · 3 comments
Closed

Dense padding prop does not apply to EditRow #1908

LeanderCoevoet opened this issue May 12, 2020 · 3 comments

Comments

@LeanderCoevoet
Copy link
Contributor

Describe the bug
If you use the dense option, it does not affect the EditRow.

To Reproduce
Steps to reproduce the behavior:

  1. Take the basic example: https://material-table.com/#/docs/features/editable
  2. Add this as options:
options={{
                    padding: "dense"
}}
  1. Try to edit or delete a row
  2. See that the row has default size.

Expected behavior
The EditRow should be dense too. Having the EditRow be a different style from the rest of the table just stands out and looks out of place.

Screenshots
image

Desktop:

  • OS: Windows 10
  • Browser: Chrome
  • Version 81

Additional context
I saw that there was a related issue but for the header:
#783

@matthewoestreich
Copy link
Collaborator

It looks like your best bet is going to be to override the MTableEditRow componnet and apply the styles that you need. https://material-table.com/#/docs/features/component-overriding

@LeanderCoevoet
Copy link
Contributor Author

I made a pull request with the changes in that will do the dense padding to the table itself by default if it is set global. If it is something that somebody doesn't want then he/she can overwrite it much easier because the size prop is set.

@matthewoestreich
Copy link
Collaborator

Closing this issue out - refer to PR for more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants