muskie9

so not sure if the ManyMany[] syntax would work for default sort

nicolaas

re (1) yeah - totally - I do remember something similar

muskie9

2 we did on the object with the belongs_many_many:

  1. private static $defaults = [
  2. 'ManyMany[ExtraFieldName]' => 'value',
  3. ];
muskie9

not sure #1 is a true issue, more of a habit from older SS versions that we never broke out of lol

nicolaas

@muskie9 you are raising a LOT of interesting points here 😉 (1) We should not use Sort? ... That is a big change. Lets avoid it if we can, but it is noted. (2) are you saying that we should add default_sort to the many_many_extraFields ... that sounds awesome! I will research.

muskie9

we just found out you can set defaults for the many_many_extraFields... was kind of mind blowing, so wonder if the same schema would work for default sort

muskie9

we've run into Sort causing some issues, so we'll use SortOrder as the field name just to be safe

muskie9
  1. public function DocumentsList()
  2. {
  3. return $this->Documents()->sort('Sort');
  4. }
nicolaas

Yeah - @muskie9, you might be right. Funny thing is that of course that is required (the same name) to make the Sortable work.