mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 13:38:26 +02:00
Fix enter/update selections for multicombo chips
This commit is contained in:
@@ -301,7 +301,11 @@ export function combo(field, context) {
|
||||
|
||||
|
||||
// Render chips
|
||||
var chips = container.selectAll('.chips').data(multiData);
|
||||
var chips = container.selectAll('.chips')
|
||||
.data(multiData);
|
||||
|
||||
chips.exit()
|
||||
.remove();
|
||||
|
||||
var enter = chips.enter()
|
||||
.insert('li', 'input')
|
||||
@@ -310,6 +314,8 @@ export function combo(field, context) {
|
||||
enter.append('span');
|
||||
enter.append('a');
|
||||
|
||||
chips = chips.merge(enter);
|
||||
|
||||
chips.select('span')
|
||||
.text(function(d) { return d.value; });
|
||||
|
||||
@@ -318,9 +324,6 @@ export function combo(field, context) {
|
||||
.attr('class', 'remove')
|
||||
.text('×');
|
||||
|
||||
chips.exit()
|
||||
.remove();
|
||||
|
||||
} else {
|
||||
getSetValue(input, displayValue(tags[field.key]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user