Skip to content

Commit

Permalink
small internal change: copy entry tag as is
Browse files Browse the repository at this point in the history
  • Loading branch information
paronne committed Mar 17, 2020
1 parent b744bd1 commit 7730e54
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions svyPopupFilter/svyToolbarFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2371,14 +2371,18 @@ function initListComponentFilterRenderer() {
if (index || index == 0) {

// TODO can i make an API in listcomponent to update an entry value !?
// clear and re-draw all elements
element.clear();
for (i = 0; i < entries.length; i++) {
var entryCopy = entries[i];
var entry = element.newEntry();

// copy entry properties
for (var prop in entryCopy) {
entry[prop] = entryCopy[prop];
}

entry.text = entryCopy.text;
if (entryCopy.dataprovider) entry.dataprovider = entryCopy.dataprovider;
entry.value = entryCopy.value;
// update display value if necessary
if (i === index) {
entry.value = displayValues.join(",");
}
Expand Down

0 comments on commit 7730e54

Please sign in to comment.