outl1ne / nova-simple-repeatable

A Laravel Nova simple repeatable rows field.
MIT License
72 stars 44 forks source link

Feature: Adding a display option in the backend for specific use cases #53

Open SebastianUhlig opened 1 year ago

SebastianUhlig commented 1 year ago

This PR has both a feature and a small fix.

The fix takes care of the slightly failed display of table headers in the DetailField when there are no entered names. I also removed the static 2rem heights per row that led to unfortunate cases when you wanted to go to "show content".

image

The feature ->colsPerRow(true or false) adds a function to SimpleRepeatable to change the display to rows in the backend. Very useful if you want to have multiple fields under each other and not squeezed next to each other. This was very useful for us, because you ended up not being able to use the text field at all.

image
Norgul commented 3 months ago

@SebastianUhlig I'd love this feature. I tried copying your PR contents in my implementation (using a custom fork of my own, so can't just do a checkout), however it is looking weird (using Nova 4). Did you do any improvements since this PR was made?

image

Norgul commented 3 months ago

Nvm, I figured it out. Classes beginning with nsr must be changed to o1