Skip to content
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

Arrays #9

Open
mohsen1 opened this issue Mar 3, 2015 · 3 comments
Open

Arrays #9

mohsen1 opened this issue Mar 3, 2015 · 3 comments

Comments

@mohsen1
Copy link
Member

mohsen1 commented Mar 3, 2015

Arrays are the most challenging aspect of this component.

Here are the questions regarding arrays:

  • How we provide add/remove functionality for array items?
  • Should we provide re-ordering functionality?
  • How we allow custom templates do clever things with arrays? Things like using tabs for each array element
@bvaughn
Copy link
Member

bvaughn commented Mar 3, 2015

This kind of overlaps with #10. We should probably discuss collections in one place (here? there?) only to avoid confusion.

@mchapman
Copy link

mchapman commented Mar 3, 2015

I see a distinction (both in visual and data representation) between arrays of strings and arrays of objects.

Add / remove there are more options with string arrays.

Auto add - from here
strings1

Explicit add
strings2

With objects I don't think I have seen an alternative to explicit add (from here:
objects

Re-ordering
Think this should be optional - it is quite heavy and not much use in some scenarios.

** Clever things **
Maybe premature to address this?

@bvaughn I appear to have continued here. I had already started capturing screen shots when I saw your post,

@bvaughn
Copy link
Member

bvaughn commented Mar 3, 2015

There's a side-effect of implementing either of the add-methods above in forms-js though: it requires users to fully describe their data with validations. (We can't initialize an object unless we know all of its possible attributes.)

There's also a further-down-the-chain side effect, which is to say that.. it complicates our templating system. Unless we insist on auto-generating all of the form markup- something I am pretty strongly apposed to (but something we should discuss on another ticket, perhaps)- then implementing our own collections-management (like you've screenshot) would take away a users ability to customize the presentation of fields within a child object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants