Open elbunuelo opened 8 years ago
@elbunuelo what would you add what syntax in the form definition would change? Add and Remove can both have their style and text changeable, what isn't possible on remove that is possible on the add? I haven't used them much so I haven't tried to customise add at all beyond the text.
@Anthropic I believe only the Add button can be customized. In the array.html file you can see that the span content is set to "×" instead of an expression. Also, the button has no class attribute that would allow to customize its appearance.
@elbunuelo so you would add support for remove to have a name defined and then slot it in as a text only non-outlined button where the X is currently or remove the X and add a button below each array item? I'm sure someone would find that useful, I wouldn't know which one people would prefer, perhaps try asking in Gitter?
I would leave the button where it's currently located, defining a name for it so the text can be changed to something else than "×". As you say, the default behavior would be to have a non-outlined button but since I plan to add a user-customizable class attribute to the parent element, people could style it as a button, should the need arise.
Enhancement
I'd like to know if a pull request implementing the possibility to customize the "remove" button in array elements would be well received and merged into the main branch.
I think it would be a nice addition for the form since the add button can be customized, this change would bring some level of consistency for both buttons.