AI-SDC / SACRO-Viewer

A tool for fast, secure and effective output checking, which can work in any TRE.
Other
2 stars 1 forks source link

reset button styles when an output's comment is cleared #184

Closed ghickman closed 1 year ago

ghickman commented 1 year ago

This reworks how we enable&disable buttons so the check for there being content in the comment element moves into the keyup handler. This allows us to shortcut the logic when there is content, enabling both buttons, and exiting the function. Then when there is no content we reset the state of the buttons back to their starting state, and disable them as necessary based on the state.

We could probably do some more refactoring on this to merge setbuttonState and setButtonActive, but given our timeframe I decided it wasn't worth it yet.

Fix: #159