Skip to content

Conversation

@dapetcu21
Copy link
Contributor

The implementation is pretty quick and dirty, but it works.

I'm not sure what to do about the UI. I currently just crammed 3 buttons with icons instead of the delete button. Probably a better solution would be using react-dnd.

An elegant way to keep track of the key prop on array items after items are deleted or reordered would also be nice.

@n1k0
Copy link
Collaborator

n1k0 commented Jun 24, 2016

Thanks, I like it a lot. I'd probably move the delete button to the right though. Otherwise the implementation is good. Can we expect to have tests for this?

@dapetcu21
Copy link
Contributor Author

I'd write some tests, but right now I'm quite in a hurry. Maybe later into the weekend?
Also, tagging #217 here.

@n1k0
Copy link
Collaborator

n1k0 commented Jun 24, 2016

For consistency, could you please replace the Add caption with a plus sign too?

@n1k0
Copy link
Collaborator

n1k0 commented Jun 24, 2016

I'd write some tests, but right now I'm quite in a hurry. Maybe later into the weekend?

Sure we can wait, take your time. And thanks for contributing.

@n1k0 n1k0 mentioned this pull request Jun 24, 2016
@n1k0
Copy link
Collaborator

n1k0 commented Jul 4, 2016

Poke?

@dapetcu21
Copy link
Contributor Author

I didn't forget :D I was just a little busy this week.

@dapetcu21
Copy link
Contributor Author

Done 😄

@n1k0
Copy link
Collaborator

n1k0 commented Jul 5, 2016

This is a great feature and a great patch. Thanks a lot for your contribution, much appreciated.

@n1k0 n1k0 merged commit 5ffa9ea into rjsf-team:master Jul 5, 2016
n1k0 added a commit that referenced this pull request Jul 6, 2016
* Fixed #217: Implement array field entries reordering (#247) * Fixed corrupted `idSchema` when the schema has a field named id (#262) * Fixed #218: Allow rendering description from schema for all fields. (#263) * Fixed #255: Replace *deeper* dependency with local `deepEquals` helper. (#264)
@n1k0
Copy link
Collaborator

n1k0 commented Jul 6, 2016

Released in v0.36.0.

@matias-sandell
Copy link

matias-sandell commented Aug 9, 2016

Awesome work!

I'm wondering if there perhaps should be a way for people to opt-in or opt-out of array field reordering (without having to use fixed item arrays or hiding them with CSS) and keep the add and remove buttons.

It sure makes sense to be able to reorder array items in some cases, but not all.

@n1k0
Copy link
Collaborator

n1k0 commented Aug 15, 2016

@matiaslarsson Sure, we could add a uiSchema widget option for that, eg. "orderable": false or similar. Would you like to work on this?

@matias-sandell
Copy link

@n1k0 Unfortunately I wouldn't be able to prioritize it right now, but if nobody else has fixed it when I have time, I'll let you know!

@swetapatnaik
Copy link

Hi,
Is the suggestion given by @matiaslarsson above like "orderable": false is implemented ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants