KETSE / casebox

Casebox: Secure all your information and team communication in one place
https://www.casebox.org
216 stars 120 forks source link

Select dropdown only loads the first 50 items, and related issues #17

Closed RafaPolit closed 8 years ago

RafaPolit commented 8 years ago

Basic problem

I have assigned a 'country' field on a template which loads countries for a form from the a Thesauri. The problems are:

Is there a config option not shown on the documentation that allows for more rows to show on selects?

Thanks in advance, Rafa.

tvitalie commented 8 years ago

Added config option "rows" for objects combo fields

oburlaca commented 8 years ago

@tvitalie, provide more info with an example. I wasn't able to understand how the issue has been fixed. By "rows" you mean an Integer, so you can specify in cfg how many records to fetch in the editor. The default in Casebox is 50.

I've tried setting: { "rows": 50 }

in cfg for an object field but it hasn't effect. see record #6911 in dev core, field "category".

Then I've tried to change fieldType to "ComboBox", but now I get JS error: Uncaught TypeError: Cannot read property 'queryBy' of undefined

tvitalie commented 8 years ago

@oburlaca, we are not talking about simple combobox fields. The js error you've obtained is because it tries to load thesauri like it was before, but we have moved all thesauri to tree.

We are talking about field of type "objects" that work in combobox mode (not "form" or other mode, i.e. "editor" option in field config is "combo" or empty).

I've changed field type back to "Objects" for "category" field of "Article" template. It has following config: { "scope": 1, "multiValued": false, "__editor": "form", "renderer": "listGreenIcons", "rows": "200" }

So, after reload opened #6911, editing category field and obtained 20 child elements from main folder (scope: 1). It really has 20 direct childs. If you want all descendants, this option should be added to config. Added descendants option and obtained following config for "category" field: { "scope": 1, "descendants": true, "multiValued": false, "__editor": "form", "renderer": "listGreenIcons", "rows": "200" }

Now it shows 200 items when accessing that field.

RafaPolit commented 8 years ago

Thanks, the descendants + rows options did the trick. Thanks.