-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Duplicate
-
Affects Version/s: 2.1.3
-
Fix Version/s: None
-
Component/s: Widgets
-
Tags:
Depending on either you provide a value directly to the element:
<template> <nuxeo-selectivity id='pkgsSelector' data='[{"id":"id1", "text":"text1"}]'> </template>
Or later on, after first paint, for example:
<template> <nuxeo-selectivity id='pkgsSelector' data='[[testRonan]]'>
attached: function() { Polymer.RenderStatus.beforeNextRender(this, function() { this.testRonan = [{id: "toto", text: "tototext", displayLabel: "totodisplaylabel"}]; }); },
the nuxeo-selectivity.data is used to filled _selectivity.data or _selectivity.items.
_dataChanged: function() { this._selectivity && this._selectivity.setOptions({items: this._wrap(this.data)}); },
if (this.data) { options.data = this.data; } else { ...<snip>... this._selectivity = new InputType(options);
The line above, showing how to set the value after first paint, is a workaround in case you want to map nuxeo-selectivity.data to _selectivity.items (note: this makes selectivity ignore the query parameter, and all resolution/suggestion is done locally, based on _selectivity.items).
- duplicates
-
ELEMENTS-554 Fix wrong data initialization in selectivity
- Resolved
- is related to
-
ELEMENTS-608 Selection initialization in suggestion widgets not relying on id formatter
- Resolved