aor-embedded-array icon indicating copy to clipboard operation
aor-embedded-array copied to clipboard

Add array sorting

Open langhard opened this issue 7 years ago • 6 comments

It's not drag and drop (Issue #6), but a possibility to sort the arrays.

langhard avatar Mar 29 '18 21:03 langhard

Great, I will check this in the evening. BTW, I think calling this feature sorting would be misleading. It should be called re-ordering, ordering .. etc.

Do you have any name suggestions ?

MhdSyrwan avatar Mar 30 '18 08:03 MhdSyrwan

Cool, thx! I like „sorting“ but (re-)ordering is also ok.

langhard avatar Mar 30 '18 11:03 langhard

Could you already have a look at the PR?

langhard avatar Apr 03 '18 06:04 langhard

I had a closer look at the code, but unfortunately haven't had the chance to run it.

Let's create a task list:

  • [ ] Rename feature name related variables, prop names and documentation.
  • [ ] Add some test cases to the test suite regarding this feature.
  • [ ] Make sure that the method you used Array.prototype.move exists in any current/future standard.

MhdSyrwan avatar Apr 03 '18 07:04 MhdSyrwan

Updated task list:

  • [X] Rename feature name related variables, prop names and documentation.
  • [ ] Add some test cases to the test suite regarding this feature.
  • [ ] Make sure that the method you used Array.prototype.move exists in any current/future standard.

Question: What do you mean with "Make sure that the method you used Array.prototype.move exists in any current/future standard." Can you help me with that?

langhard avatar Apr 11 '18 08:04 langhard

@langhard I've researched more about the move method. I was mistakenly thinking that it's an obsolete method of the JavaScript array prototype. And forgot about the fact that items is a FieldArray and not a normal JS array.

Currently our new todo list is:

  • [x] Rename feature name related variables, prop names and documentation.
  • [ ] Add some test cases to the test suite regarding this feature.

Sorry for the inconvenience.

MhdSyrwan avatar Apr 11 '18 10:04 MhdSyrwan