Bug 1540601 - Ensuring that TreeView filtering works with keyboard. r=nchevobbe

Differential Revision: https://phabricator.services.mozilla.com/D25552
This commit is contained in:
Yura Zenevich
2019-04-10 00:58:17 +00:00
parent 194e442797
commit 10aba0048d
3 changed files with 150 additions and 1 deletions

View File

@@ -546,7 +546,20 @@ define(function(require, exports, module) {
member: member,
columns: this.state.columns,
id: member.path,
ref: row => row && this.rows.push(row),
ref: row => {
if (!row) {
return;
}
const rowEl = findDOMNode(row);
if (!rowEl || !rowEl.offsetParent) {
// offsetParent returns null when the element has style.display
// set to none (done by TreeView filtering).
return;
}
this.rows.push(row);
},
onClick: this.onClickRow.bind(this, member.path),
onContextMenu: this.onContextMenu.bind(this, member),
});