mirror of
https://github.com/nasa/openmct.git
synced 2025-04-11 21:31:06 +00:00
Table CPU Performance Improvements (#7392)
* dereactifying the row before passing it to the commponent * debouncin * i mean... throttle
This commit is contained in:
parent
3e31bbef97
commit
b985619d16
@ -234,7 +234,7 @@
|
||||
:object-path="objectPath"
|
||||
:row-offset="rowOffset"
|
||||
:row-height="rowHeight"
|
||||
:row="row"
|
||||
:row="getRow(rowIndex)"
|
||||
:marked="row.marked"
|
||||
@mark="markRow"
|
||||
@unmark="unmarkRow"
|
||||
@ -288,6 +288,7 @@ import _ from 'lodash';
|
||||
import { toRaw } from 'vue';
|
||||
|
||||
import stalenessMixin from '@/ui/mixins/staleness-mixin';
|
||||
import throttle from '../../../utils/throttle';
|
||||
|
||||
import CSVExporter from '../../../exporters/CSVExporter.js';
|
||||
import ProgressBar from '../../../ui/components/ProgressBar.vue';
|
||||
@ -504,6 +505,8 @@ export default {
|
||||
});
|
||||
}
|
||||
|
||||
this.updateVisibleRows = throttle(this.updateVisibleRows, 1000);
|
||||
|
||||
this.table.on('object-added', this.addObject);
|
||||
this.table.on('object-removed', this.removeObject);
|
||||
this.table.on('refresh', this.clearRowsAndRerender);
|
||||
@ -633,6 +636,9 @@ export default {
|
||||
|
||||
this.calculateScrollbarWidth();
|
||||
},
|
||||
getRow(rowIndex) {
|
||||
return toRaw(this.visibleRows[rowIndex]);
|
||||
},
|
||||
sortBy(columnKey) {
|
||||
// If sorting by the same column, flip the sort direction.
|
||||
if (this.sortOptions.key === columnKey) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user