QField icon indicating copy to clipboard operation
QField copied to clipboard

Option to set max number of lines shown for Widget Type Relation Editor

Open jfbourdon opened this issue 2 years ago • 1 comments

When using a Relation Editor type widget with a many to one relation, the maximum number of entries shown before scrolling become needed is of 4 (see image below). We would like to see this limit increased to 15 or 20.

multiple_lines

If it's a hardcoded limit, where should I look in the code to edit this value? I suppose it has more to do with the maximum heigh of box before it becomes scrollable than with the number of entries. We might then try finding a way to fund a feature request for having the ability to change this value per widget. Thanks for any hints.

jfbourdon avatar Dec 01 '21 17:12 jfbourdon

The height is defined in the widget, see here: https://github.com/opengisch/QField/blob/master/src/qml/editorwidgets/relationeditors/relation_editor.qml#L16 The tricky bit will be where to make it configurable.

m-kuhn avatar Dec 09 '21 06:12 m-kuhn

@jfbourdon , you'll be happy to know this is now a project configuration that you can tweak using qfieldsync. Closing as implemented. Cheers

nirvn avatar Mar 23 '24 11:03 nirvn

Documented here: https://docs.qfield.org/get-started/tutorials/get-started-qfs/#configuring-maximum-items-visibility-for-qfield

suricactus avatar Mar 23 '24 11:03 suricactus