OpenEnergyTools / oscd-publisher

Apache License 2.0
1 stars 2 forks source link

DataSet and GSEControl editors don't refresh/update after selecting a different Control Block #15

Closed jarradraumati closed 2 months ago

jarradraumati commented 5 months ago

When I select a GOOSE Control block (for example, CILO2 from IED XAT_PLC_1) and change the DataSet name and/or GSEControl name, it changes as expected after I click "Save".

When I then select a different GOOSE control block, it shows the values after I made the change in the previous GOOSE control block.

Perhaps there is a refresh/update that is not being performed on the textfield.

https://github.com/OpenEnergyTools/oscd-publisher/assets/3224671/a4662b8f-a83e-4f14-86ab-a70009f461d7

SCD File for testing/reproducing.

XAT_goose_control_block_update.zip

danyill commented 2 months ago

The issue seems to be that when a user has made a change but not saved it, we need to reset the inputs on a change in the selection list (e.g. to a different GSEControl)

The way I can see to resolve it is to, on a change in the list item call resetInputs (and perhaps modify this to have an "all" option). But this may not be a good approach. I'm happy to try a PR with a hint about the direction to go in.

JakobVogelsang commented 2 months ago

Uff sorry I totally forgot to fix this one. In such a case, I would propose to have a dialog asking whether the unsaved changes should be saved. If so the method resetInput will be called automatically. If we need to call it on all components.

The quicker way would be to just reset those on change and let it happen that from time to time users will complain.