-
Notifications
You must be signed in to change notification settings - Fork 13
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
Make FieldString handle array of strings #389
Comments
Like multiple reference but for Text then, so implemented presumably as an |
What kind of data is within scope here? |
Looks like one easy option would be using I think that that warrants a plus/minus, or maybe a "you pressed enter so we made a new one" / "you pressed backspace so we deleted that option" like in tickbox-based apps |
I've added the |
In API, a field of type In terms of deciding when to render this view over the normal text field, it's easy for existing documents, as we can look at the value and render the multi-row field if the value is an array, and the normal text field if the value is a string. But what do we do when we're starting a new document? I see a couple of options:
Any thoughts? |
(Pinging @abovedave) |
I think that this is a choice made by the schema creator, and shouldn't normally be allowed to be swapped between multiple/single in a tab like 3, because it could necessarily mess up the schema. 2 is probably a new publish block option as I can see wanting both 1 and 2, so maybe:
|
Could it be a whole new field vs modifying the |
API is not ready for custom fields yet, so it would still need to be I have removed the blocked label, as there's nothing stopping development work. |
Would you prefer subtype list to multiple boolean @eduardoboucas ? |
I'm not sure, to be honest. The I guess the answer is in how much of this logic is shared with the existing component. If it is a lot (and I suspect it might be), it probably makes more sense to not use |
@abovedave , could you please clarify what [+] and [-] should look like exactly. Should these be new UI elements, or do we have them somewhere already (I haven't found anything)? And how should reordering work - drag&drop? |
FIlters are probably the closest match, if you want to set up the repeatable, ordering etc side I can come in after and tweak the ui? See the 'drag handle' example here As for a usecase, a list of features is a good place to start e.g., our product pages https://dadi.cloud/en/api/ I'm wondering if it should respect if it's a |
I'd like to get this moving again. I propose a As for the interface, I imagine something like this, where each line is represented by an input field that can moved around within the list with drag-and-drop. @ohmoses you can let me and @joverbye know if you need any direction in terms of UI elements. |
A field which can have multiple rows of content added
The text was updated successfully, but these errors were encountered: