mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-07 15:08:24 +00:00
Disable CTRL+Click and SHIFT+Click actions on tag panel
This commit is contained in:
@@ -115,9 +115,11 @@ class TagOrderStore extends Store {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'select_tag': {
|
case 'select_tag': {
|
||||||
|
const allowMultiple = !SettingsStore.getValue("feature_communities_v2_prototypes")
|
||||||
|
|
||||||
let newTags = [];
|
let newTags = [];
|
||||||
// Shift-click semantics
|
// Shift-click semantics
|
||||||
if (payload.shiftKey) {
|
if (payload.shiftKey && allowMultiple) {
|
||||||
// Select range of tags
|
// Select range of tags
|
||||||
let start = this._state.orderedTags.indexOf(this._state.anchorTag);
|
let start = this._state.orderedTags.indexOf(this._state.anchorTag);
|
||||||
let end = this._state.orderedTags.indexOf(payload.tag);
|
let end = this._state.orderedTags.indexOf(payload.tag);
|
||||||
@@ -135,7 +137,7 @@ class TagOrderStore extends Store {
|
|||||||
this._state.orderedTags.slice(start, end + 1).concat(newTags),
|
this._state.orderedTags.slice(start, end + 1).concat(newTags),
|
||||||
)];
|
)];
|
||||||
} else {
|
} else {
|
||||||
if (payload.ctrlOrCmdKey) {
|
if (payload.ctrlOrCmdKey && allowMultiple) {
|
||||||
// Toggle individual tag
|
// Toggle individual tag
|
||||||
if (this._state.selectedTags.includes(payload.tag)) {
|
if (this._state.selectedTags.includes(payload.tag)) {
|
||||||
newTags = this._state.selectedTags.filter((t) => t !== payload.tag);
|
newTags = this._state.selectedTags.filter((t) => t !== payload.tag);
|
||||||
|
|||||||
Reference in New Issue
Block a user