Refactor data grid components

This commit is contained in:
Dede Fuji Abdul
2024-03-21 10:52:11 +07:00
parent f314367e76
commit 3e1c2ea137
72 changed files with 1639 additions and 991 deletions

View File

@@ -9,6 +9,7 @@
</Filters>
<div>
<DxDataGrid
ref="dataGridRef"
:allow-column-reordering="true"
class="max-h-[calc(100vh-140px)] mb-10"
:data-source="data"
@@ -383,7 +384,7 @@ const showIndicator = ref(true)
const shading = ref(true)
const showPane = ref(true)
const data = ref<any[]>([])
const dataDetail = ref<any>()
const dataSelected = ref<any>()
const dialogDetail = ref(false)
const { onResult, onError, loading, refetch } = useQuery(
queries.monalisa.gangguan.rekap.jumlahDurasiRptRctGangguan,
@@ -457,10 +458,14 @@ const onExporting = (e: any) => {
e.cancel = true
}
}
const dataGridRef = ref<DxDataGrid | null>(null)
const clearSelection = () => {
const dataGrid = dataGridRef.value!.instance!
dataGrid.clearSelection()
}
const onSelectionChanged = ({ selectedRowsData }: any) => {
const data = selectedRowsData[0]
console.log(data)
clearSelection()
}
const filters = ref<any>({