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

Bug: It is possible remove last row in grid and replicators even when min_rows is set to 1. #2207

Closed
benfurfie opened this Issue Oct 19, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@benfurfie

benfurfie commented Oct 19, 2018

Describe the bug
When you have a grid or a replicator, and the fieldtype is set to have a minimum of 1 row and a max of 1 row, it is possible to delete that row as the buttons are still visible.

To Reproduce
Steps to reproduce the behavior:

  1. Create a grid or a replicator, and in fieldtype's extras settings set the max number of rows to one, and the min number of rows to 1.
  2. Create a new page with that fieldtype.
  3. Depending whether it's stacked or table, click on the x.
  4. Field is removed, despite it being set to min_row: 1.

Expected behavior
The remove buttons (in the group header on stacked and row-controls on table) should not be visble if a grid or replicator has the config min_rows: 1 and max_rows: 1.

Screenshots
Example of issue with Stacked
Example of issue with Table
Config
Stacked without header as it's not necessary on single instance
Table without row controls as they aren't necessary

Environment details (please complete the following information):

  • Statamic Version [e.g. 2.10.7]
@jesseleite

This comment has been minimized.

Member

jesseleite commented Oct 26, 2018

Not sure what you mean about min rows on replicator? Pending release for fix on grid though 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment