From 2d3841b95f23b437a12496412e66ae40a9cd359e Mon Sep 17 00:00:00 2001 From: "andy.lee" Date: Mon, 23 Dec 2024 16:33:01 +0800 Subject: [PATCH] fix: keep parent sriov filter result if pcidevices status change Signed-off-by: andy.lee (cherry picked from commit 44458a0e0e2e6848180a7e3b080feb6f55d064f3) --- .../VirtualMachinePciDevices/DeviceList.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachinePciDevices/DeviceList.vue b/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachinePciDevices/DeviceList.vue index 41c06ce4996..20ab3eb0dee 100644 --- a/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachinePciDevices/DeviceList.vue +++ b/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachinePciDevices/DeviceList.vue @@ -93,7 +93,11 @@ export default { devices: { handler(v) { this.rows = v; - this.filterRows = this.rows; + if (this.parentSriov) { + this.filterRows = this.rows.filter(row => row.labels[this.parentSriovLabel] === this.parentSriov); + } else { + this.filterRows = this.rows; + } }, immediate: true, },