mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 18:02:18 +00:00
adapt event dataProcessed and method autoselect
This commit is contained in:
@@ -223,9 +223,9 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
event: 'dataProcessed',
|
event: 'dataProcessed',
|
||||||
//handler: this.autoSelectRows TODO(Manu) combine
|
|
||||||
handler: (data) => {
|
handler: (data) => {
|
||||||
this.reexpandRows()
|
this.reexpandRows()
|
||||||
|
this.autoSelectRows()
|
||||||
this.$emit('update:selected', {})
|
this.$emit('update:selected', {})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -241,7 +241,7 @@ export default {
|
|||||||
event: 'rowClick',
|
event: 'rowClick',
|
||||||
handler: this.handleRowClick // TODO(chris): this should be in the filter component
|
handler: this.handleRowClick // TODO(chris): this should be in the filter component
|
||||||
},
|
},
|
||||||
/* {
|
{
|
||||||
event: 'dataTreeRowExpanded',
|
event: 'dataTreeRowExpanded',
|
||||||
handler: (data) => {
|
handler: (data) => {
|
||||||
this.getExpandedRows()
|
this.getExpandedRows()
|
||||||
@@ -252,7 +252,7 @@ export default {
|
|||||||
handler: (data) => {
|
handler: (data) => {
|
||||||
this.getExpandedRows()
|
this.getExpandedRows()
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
],
|
],
|
||||||
focusObj: null, // TODO(chris): this should be in the filter component
|
focusObj: null, // TODO(chris): this should be in the filter component
|
||||||
lastSelected: null,
|
lastSelected: null,
|
||||||
@@ -286,7 +286,7 @@ export default {
|
|||||||
this.$emit('update:selected', data);
|
this.$emit('update:selected', data);
|
||||||
},
|
},
|
||||||
autoSelectRows(data) {
|
autoSelectRows(data) {
|
||||||
if (this.lastSelected) {
|
if (Array.isArray(this.lastSelected) && this.lastSelected.length){
|
||||||
// NOTE(chris): reselect rows on refresh
|
// NOTE(chris): reselect rows on refresh
|
||||||
let selected = this.lastSelected.map(el => this.$refs.table.tabulator.getRow(el.prestudent_id))
|
let selected = this.lastSelected.map(el => this.$refs.table.tabulator.getRow(el.prestudent_id))
|
||||||
// TODO(chris): unselect current item if it's no longer in the table?
|
// TODO(chris): unselect current item if it's no longer in the table?
|
||||||
|
|||||||
Reference in New Issue
Block a user