Opened 7 years ago
Closed 7 years ago
#2117 closed defect (fixed)
Filtering doesn't work for annotation types with "Interface=selection list"
Reported by: | Nicklas Nordborg | Owned by: | everyone |
---|---|---|---|
Priority: | minor | Milestone: | BASE 3.12.3 |
Component: | web | Version: | |
Keywords: | Cc: |
Description
Create an enumerated annotation type and select the Interface=selection list
option.
On a list page, display that annotation type and try filter on that columns. It doesn't work. There is no visible error message.
Turning on the "Web console" (in Firefox) reveals an error message which seems related:
TypeError: can't assign to properties of (new String("exclude")): not an object main-2.js:4553:4 SmartEnum</internal.createDropdownDiv http://.../include/scripts/main-2.js:4553:4 SmartEnum</smartenum.setActive http://.../include/scripts/main-2.js:4321:18 SmartEnum</internal.onFocus http://.../include/scripts/main-2.js:4574:3
One workaround is to select the Interface=radiobuttons/checkboxes
option instead. In most cases, this is usually also the desired option unless the enumeration contains a very large number of options.
Note:
See TracTickets
for help on using tickets.
(In [7483]) Fixes #2117: Filtering doesn't work for annotation types with "Interface=selection list"
This bug was created as a side-effect by #2098. We are trying to set a new property (.div) on a "String" object. This is not allowed in strict mode.
In any case, this time the fix was to simply remove that line of code since we never used the value later on.
As a side-note, similar code is used when the
Interface=radiobuttons/checkboxes
option is selected. But in this case the list of options is our own custom objects instead of strings and we actually need the .div property as well.