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

fix: apply dropdown padding on whole table #1078

Merged
merged 1 commit into from
Feb 4, 2021

Conversation

mantariksh
Copy link
Contributor

@mantariksh mantariksh commented Feb 4, 2021

Problem

In table fields, whenever dropdown fields are opened in the last 2 rows, we add padding to the bottom of the field so the dropdown options do not get hidden. This is broken in mobile view, likely since #894, resulting in dropdown options being hidden for the last row.

Solution

The problem is that table rows in mobile are display: block; as opposed to display: flex; like in desktop, resulting in the padding being applied incorrectly. The fix was to apply the padding on the table field as a whole instead of just the last row, which has the same effect but works properly in mobile.

Screenshots

Before (mobile)

image

After (mobile)

image

Before and after (desktop)

image

Tests

  • Create a table field with multiple text and dropdown columns, where additional rows can be added. In the mobile view, check that opening a dropdown in either of the last 2 rows results in additional padding appearing at the bottom of the table, such that the dropdown options are visible.
  • Add rows to the table field and check that the padding still only applies to the newly created last 2 rows.
  • Delete the rows which were added and check that the behaviour is consistent.
  • Repeat the above 3 checks for the desktop view.

@mantariksh mantariksh changed the base branch from develop to release-4.56.0 February 4, 2021 02:06
@mantariksh mantariksh changed the base branch from release-4.56.0 to develop February 4, 2021 02:07
@mantariksh mantariksh merged commit ae7a927 into develop Feb 4, 2021
@tshuli tshuli mentioned this pull request Feb 10, 2021
@mantariksh mantariksh deleted the fix/mobile-table-dropdown branch April 13, 2021 06:37
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

Successfully merging this pull request may close these issues.

2 participants