[MGNLUI-3438] filterMode on Select-Fields has no effect Created: 21/May/15 Updated: 19/Apr/16 Resolved: 03/Jun/15 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | None |
| Affects Version/s: | 5.3.8 |
| Fix Version/s: | 5.3.9 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Adi De Masi | Assignee: | AntonĂn Juran |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | support, ui, usability, ux | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Template: |
|
||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||
| Release notes required: |
Yes
|
||||||||||||
| Date of First Response: | |||||||||||||
| Description |
|
When using a info.magnolia.ui.form.field.definition.SelectFieldDefinition a (Vaadin) filterMode can be defined according to https://documentation.magnolia-cms.com/display/DOCS/Select This should enable an user to filter the options by a filter-term. This is useful, if you have a lot of options in the select field. However, this option has no effect because of two reasons: info.magnolia.ui.form.field.factory.SelectFieldFactory disables text input with setTextInputAllowed(false); on the combobox, which sets "readonly" on the input-field. See https://jira.magnolia-cms.com/browse/MGNLUI-1088 Second reason is that in the same class pageLength is set to 0 (setPageLength(0)). This was done in 5.3.8 (https://jira.magnolia-cms.com/browse/MGNLUI-3297) and disables the previous paging on select fields (which was set to 10). Problem is, that the vaadin-combobox ignores filters, when pageLength is 0, see com.vaadin.ui.ComboBox.getOptionsWithFilter(boolean) The isssue can be solved by re-enabling textinput and set the page-length to a (high) value: @Override protected AbstractSelect createFieldComponent() { select = super.createFieldComponent(); if (select instanceof ComboBox) { ((ComboBox) select).setFilteringMode(FilteringMode.CONTAINS); ((ComboBox) select).setTextInputAllowed(true); ((ComboBox) select).setPageLength(100); } return select; } |
| Comments |
| Comment by AntonĂn Juran [ 04/Jun/15 ] |
|
After release of ver. 5.3.9 add into docu (link: https://documentation.magnolia-cms.com/display/DOCS/Select, table: "Common properties that apply to all select fields.") properties and their descriptions: |