Open lordrip opened 6 months ago
I do not understand why adding at the top. I usually expect that new elements in array are added at the end. Can you clarify in which case it is better to add it at the top/beginning?
Let's say we have the following structure:
Title | Add button
When adding a new element, if it appears at the end, this means scrolling down and up to create a new item, configuring it and then going to the top to add a new one. For instance with setHeaders
EIP
I would expect a scroll bar for the list of item itself, so that the title and add button are always visible
Another alternative could be to have an "Add new" button at the bottom of the newly created element.
Please describe the feature that you want to propose
When adding a new array element, for instance, a new header in the
setHeaders
processor, it would be better to place the newly created header field at the top.This needs to be tackled at https://github.com/KaotoIO/uniforms-patternfly side.
Here's where the new item gets concatenated: https://github.com/KaotoIO/uniforms-patternfly/blob/12b726c10c1b458613850c8de3251324cfafc8b1/src/ListAddField.tsx#L51C42-L51C106