Add ability to set the default orderBy in nested element indexes #16236
Unanswered
ryansupercool
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We may be missing something but there doesn't appear to be a way to set the default orderBy within nested element? (We're using the
ElementIndexViewMode::Table
view.We've defined
defineSortOptions
which has one attribute but Craft looks to be using the ID instead. DefiningdefineSources
with a "*" source anddefaultSort
also does not appear to work.The only way that I can see of setting a default sort order is via the
sortOrder
column inelements_owners
. For nested elements that aren't manually "sortable" is would be really helpful to be able to define the default sort via other means than having to maintainsortOrder
for date attributes - this itself may not be the most efficient as from what I can tell you'd have to do this viaNestedElementManager::EVENT_AFTER_SAVE_ELEMENTS
which will have happened after Craft has already resorted them.Beta Was this translation helpful? Give feedback.
All reactions