Bug 32030: Fix condition for DT destruction
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
715ce3806d
commit
a596acc28e
8 changed files with 24 additions and 20 deletions
|
@ -266,11 +266,6 @@ export default {
|
||||||
|
|
||||||
}, agreement_table_settings, 1)
|
}, agreement_table_settings, 1)
|
||||||
},
|
},
|
||||||
destroy_table: function () {
|
|
||||||
$('#agreement_list')
|
|
||||||
.DataTable()
|
|
||||||
.destroy(true)
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (!this.building_table) {
|
if (!this.building_table) {
|
||||||
|
@ -279,8 +274,11 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
// This delays the closing of the modal, do we really need it?
|
if ($.fn.DataTable.isDataTable('#agreement_list')) {
|
||||||
//this.destroy_table()
|
$('#agreement_list')
|
||||||
|
.DataTable()
|
||||||
|
.destroy(true)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
components: { Toolbar },
|
components: { Toolbar },
|
||||||
name: "AgreementsList",
|
name: "AgreementsList",
|
||||||
|
|
|
@ -243,7 +243,7 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
if (!$.fn.DataTable.isDataTable('#package_list')) {
|
if ($.fn.DataTable.isDataTable('#package_list')) {
|
||||||
$('#package_list')
|
$('#package_list')
|
||||||
.DataTable()
|
.DataTable()
|
||||||
.destroy(true)
|
.destroy(true)
|
||||||
|
|
|
@ -136,9 +136,11 @@ export default {
|
||||||
this.build_datatable()
|
this.build_datatable()
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
$('#package_list')
|
if ($.fn.DataTable.isDataTable('#package_list')) {
|
||||||
.DataTable()
|
$('#package_list')
|
||||||
.destroy(true)
|
.DataTable()
|
||||||
|
.destroy(true)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
resources: Array,
|
resources: Array,
|
||||||
|
|
|
@ -259,7 +259,7 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
if ( ! $.fn.DataTable.isDataTable( '#title_list' ) ) {
|
if ($.fn.DataTable.isDataTable('#title_list')) {
|
||||||
$('#title_list')
|
$('#title_list')
|
||||||
.DataTable()
|
.DataTable()
|
||||||
.destroy(true)
|
.destroy(true)
|
||||||
|
|
|
@ -98,9 +98,11 @@ export default {
|
||||||
this.build_datatable()
|
this.build_datatable()
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
$('#title_list')
|
if ($.fn.DataTable.isDataTable('#title_list')) {
|
||||||
.DataTable()
|
$('#title_list')
|
||||||
.destroy(true)
|
.DataTable()
|
||||||
|
.destroy(true)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
package_id: String,
|
package_id: String,
|
||||||
|
|
|
@ -211,7 +211,7 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
if (!$.fn.DataTable.isDataTable('#package_list')) {
|
if ($.fn.DataTable.isDataTable('#package_list')) {
|
||||||
$('#package_list')
|
$('#package_list')
|
||||||
.DataTable()
|
.DataTable()
|
||||||
.destroy(true)
|
.destroy(true)
|
||||||
|
|
|
@ -70,9 +70,11 @@ export default {
|
||||||
this.build_datatable()
|
this.build_datatable()
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
$('#package_list')
|
if ($.fn.DataTable.isDataTable('#package_list')) {
|
||||||
.DataTable()
|
$('#package_list')
|
||||||
.destroy(true)
|
.DataTable()
|
||||||
|
.destroy(true)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
resources: Array,
|
resources: Array,
|
||||||
|
|
|
@ -201,7 +201,7 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
if (!$.fn.DataTable.isDataTable('#title_list')) {
|
if ($.fn.DataTable.isDataTable('#title_list')) {
|
||||||
$('#title_list')
|
$('#title_list')
|
||||||
.DataTable()
|
.DataTable()
|
||||||
.destroy(true)
|
.destroy(true)
|
||||||
|
|
Loading…
Reference in a new issue