Expand search parents whith Select All shortcut in item tree
This commit is contained in:
parent
1db2eb4aea
commit
6dce19d546
2 changed files with 8 additions and 3 deletions
|
@ -492,7 +492,7 @@ class VirtualizedTable extends React.Component {
|
|||
if (e.altKey) return;
|
||||
|
||||
const shiftSelect = e.shiftKey;
|
||||
const movePivot = e.ctrlKey || e.metaKey;
|
||||
const movePivot = Zotero.isMac ? e.metaKey : e.ctrlKey;
|
||||
const rowCount = this.props.getRowCount();
|
||||
|
||||
switch (e.key) {
|
||||
|
@ -554,9 +554,8 @@ class VirtualizedTable extends React.Component {
|
|||
if (this.selection.selectEventsSuppressed) break;
|
||||
this.invalidate();
|
||||
if (!this.selection.selectEventsSuppressed) {
|
||||
this.props.onSelectionChange(this, shouldDebounce);
|
||||
this.props.onSelectionChange(this, false);
|
||||
}
|
||||
this.selection.rangedSelect(0, this.props.getRowCount()-1);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -365,6 +365,7 @@ var ItemTree = class ItemTree extends LibraryTree {
|
|||
? []
|
||||
: newSearchItems.filter(item => !!item.parentItemID).map(item => item.parentItemID)
|
||||
);
|
||||
this._searchParentIDs = newSearchParentIDs;
|
||||
newSearchItems = new Set(newSearchItems);
|
||||
|
||||
var newCellTextCache = {};
|
||||
|
@ -1059,6 +1060,11 @@ var ItemTree = class ItemTree extends LibraryTree {
|
|||
const _promise = Zotero.Tags.toggleItemsListTags(items, colorData.name);
|
||||
return false;
|
||||
}
|
||||
else if (event.key == 'a' && (Zotero.isMac ? event.metaKey : event.ctrlKey)) {
|
||||
if (!this.collectionTreeRow.isPublications()) {
|
||||
this.expandMatchParents(this._searchParentIDs);
|
||||
}
|
||||
}
|
||||
else if (event.key == '+' && !(event.ctrlKey || event.altKey || event.metaKey)) {
|
||||
this.expandAllRows();
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue