- Issue created by @erutan
- Status changed to Closed: works as designed
12 months ago 6:44pm 9 April 2024 - πΊπΈUnited States erutan
Nevermind, this was was a VBO bulk edit option "Always show selection info". :)
- Status changed to Active
12 months ago 8:45pm 9 April 2024 - Status changed to Postponed: needs info
9 months ago 8:20pm 5 July 2024 - πΊπΈUnited States smustgrave
Not sure know what you mean "most recent ones near the top"
- πΊπΈUnited States erutan
The contents of a select list in BEF are sorted in ascending order, so for sequentially increasing items (think serial numbers, invoices, purchase orders, whatever) the oldest ones are the top of the select. It'd be nice to be able to set them to descending so the more recent ones would be on top.
0003
0002
0001etc vs
0001
0002
0003 - Status changed to Active
9 months ago 11:15pm 16 July 2024 - πΊπΈUnited States gcalex5
I looked at this a little bit in terms of implementing it for Taxonomy Terms, and I don't think it's feasible. The query to generate Term options for the exposed form seems to occur inside of Core within the valueForm function of:
- /core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php
The sort value appears to be hardcoded within Core to "weight." No variables seem to be passed into it besides the Vocabulary ID.
Trying to manipulate it from hook_query_alter I don't see any variables passed into the Query to indicate that it's coming from any specific View or Filter.
The only approach that I think would make it possible would be to toss out the options generated from Core and re-query them altogether, which doesn't really make sense from a performance hit point-of-view imo.
- πΊπΈUnited States erutan
Thanks for sharing what you found out - while I know you were looking into taxo and don't expect you to develop outside of that itch does it seem this would also be the case for non reference fields?