Question: my interface code which mostly works however there is a slight bug, whenever new / updated data is received by my socket code, any expanded
my interface code which mostly works however there is a slight bug, whenever newupdated data is received by my socket code, any expanded table records displaying the subtable content automatically close, which is not what i want, my expanded tables should remain expanded unless closed by the user, not when the websocket updates data, please fix this bug here is the template code socket code in script: sockets:
imwbupdateddiagnostic: functiondata
data.items.forEachitem
console.logdiagnostic update received: data
const indexOfEl this.diagnostics.items.findIndex
x xdeviceserial item.deviceserial && xsubtype item.subtype
;
if indexOfEl
for const key in item
if key 'deviceserial' && key 'subtype'
this.diagnostics.itemsindexOfElkey itemkey;
else
this.diagnostics.items.pushitem;
;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
