Scroll to target plugin after conflict filtering

This helps users identify the plugin in the list and quickly see what
other plugins are around it.
This commit is contained in:
Oliver Hamlet
2016-06-14 20:35:48 +01:00
parent 549020e54c
commit 8457066f56
+6
View File
@@ -422,6 +422,12 @@ function onConflictsFilter(evt) {
}
});
loot.filters.apply(loot.game.plugins);
/* Scroll to the target plugin */
const list = document.getElementById('pluginCardList');
const index = list.items.findIndex(item => item.name === evt.target.value);
list.scrollToIndex(index);
loot.Dialog.closeProgress();
}).catch(loot.handlePromiseError);
} else {