Skip to content

Commit b32fade

Browse files
anikachurilovajrcastro2
authored andcommitted
custom fields ui: add sorting by title
* closes CERNDocumentServer/cds-rdm#207
1 parent 47b1df7 commit b32fade

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

invenio_app_rdm/records_ui/views/deposits.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,9 @@ def load_custom_fields():
291291
if field_error_label:
292292
error_labels[f"custom_fields.{field['field']}"] = field_error_label
293293
if getattr(field_instance, "relation_cls", None):
294+
sort_by = field.get("props", {}).get("sort_by")
295+
if sort_by:
296+
field_instance.sort_by = sort_by
294297
# add vocabulary options to field's properties
295298
field["props"]["options"] = field_instance.options(g.identity)
296299
# mark field as vocabulary

0 commit comments

Comments
 (0)