facets
facets copied to clipboard
Weird effects after setting filteredDataIndices
Settings the filteredDataIndices
property on a <facets-dive>
component causes some weird things to happen in the UI.
- There sometimes seem to be two copies of the moving yellow selection rectangle.
- You can select data points that aren't visualized.
To reproduce, go to https://pair-code.github.io/facets/quickdraw.html, then in the chrome devtools console, run
const fdComponent = document.querySelector('facets-dive');
fdComponent.filteredDataIndices = [0,1,2,3,4,5];
// then click somewhere not on the six faces
// then click on one of the six faces
This is on Google Chrome 80.0.3987.132 on Mac OS 10.15.3
Thanks for the report. I'm able to repro the issue and see that selecting items outside of this displayed is possible, and causes fdComponent.selectedIndices to show items selected that shouldn't be visible, and selecting the top-right element in your case causes selectedIndices to contain the correct datapoint index, and also a second index for an item that shouldn't be visible.