react-gears
react-gears copied to clipboard
HasManyFields is missing the concept of "required rows"
The Rails version of HasManyFields has an option called "required_rows." This is the minimum number of rows it will display. If there is that minimum number, the delete button will not show.
If you do not specify a required_rows option, the default is 1. This results in the default behavior loading with one row already there. Occasionally we use the options to set it to 0 or to 2 (think Journal Entries).
The behavior today of React Gears does not support enforcing a minimum number of rows and the default behavior is that there are no rows showing. You have to modify the initial value to be an array on empty object to get one row to show up on load.