mirror of
https://github.com/nasa/openmct.git
synced 2025-01-11 23:42:41 +00:00
Merge pull request #3228 from nasa/telemetry-table-config-updates
Update TelemetryTable config to allow disable multiselect
This commit is contained in:
commit
b76d4b76cb
@ -117,7 +117,7 @@
|
|||||||
title="Deselect All"
|
title="Deselect All"
|
||||||
@click="unmarkAllRows()"
|
@click="unmarkAllRows()"
|
||||||
>
|
>
|
||||||
<span class="c-button__label">Deselect All</span>
|
<span class="c-button__label">{{ `Deselect ${marking.disableMultiSelect ? '' : 'All'}` }} </span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<slot name="buttons"></slot>
|
<slot name="buttons"></slot>
|
||||||
@ -303,6 +303,7 @@ export default {
|
|||||||
default() {
|
default() {
|
||||||
return {
|
return {
|
||||||
enable: false,
|
enable: false,
|
||||||
|
disableMultiSelect: false,
|
||||||
useAlternateControlBar: false,
|
useAlternateControlBar: false,
|
||||||
rowName: '',
|
rowName: '',
|
||||||
rowNamePlural: ""
|
rowNamePlural: ""
|
||||||
@ -787,6 +788,11 @@ export default {
|
|||||||
this.$set(markedRow, 'marked', true);
|
this.$set(markedRow, 'marked', true);
|
||||||
this.pause();
|
this.pause();
|
||||||
|
|
||||||
|
if (this.marking.disableMultiSelect) {
|
||||||
|
this.unmarkAllRows();
|
||||||
|
insertMethod = 'push';
|
||||||
|
}
|
||||||
|
|
||||||
this.markedRows[insertMethod](markedRow);
|
this.markedRows[insertMethod](markedRow);
|
||||||
},
|
},
|
||||||
unmarkAllRows(skipUnpause) {
|
unmarkAllRows(skipUnpause) {
|
||||||
@ -800,7 +806,7 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.markedRows.length) {
|
if (!this.markedRows.length || this.marking.disableMultiSelect) {
|
||||||
this.markRow(rowIndex);
|
this.markRow(rowIndex);
|
||||||
} else {
|
} else {
|
||||||
if (this.markedRows.length > 1) {
|
if (this.markedRows.length > 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user