openpharma / clinsight

ClinSight - An application for medical monitoring within clinical trials
https://openpharma.github.io/clinsight/
Other
3 stars 0 forks source link

Add callback to "go to form" on double click event #103

Closed jthompson-arcus closed 3 weeks ago

jthompson-arcus commented 1 month ago

Create double click event to "go to form" for overview table.

jthompson-arcus commented 1 month ago

@LDSamson what do you think of adding this type of callback to tables with a "go to form" option? Only thing I don't really like about it is that I'm simulating a click on the go_to_form button in a sub-module which is kind of against the spirit of modules.

jthompson-arcus commented 1 month ago

I looked into writing this as a JS function that would be bundled with the package but it seemed a little pointless because the help documentation states the body of a JavaScript callback function with the argument table to be applied to the DataTables instance (i.e. table). In other words, DT::datatable is just inputting the argument as the body of a function(table) call.

LDSamson commented 4 weeks ago

Looks good. Two small comments: It would be nice to update the test description as well.

Since the feature is about browsing through the application, I think it is nice to preserve the old code (that you deleted) as a test for clicking the header widget.

I will push a change with these changes, let me know what you think.

jthompson-arcus commented 4 weeks ago

Looks good. Two small comments: It would be nice to update the test description as well.

Since the feature is about browsing through the application, I think it is nice to preserve the old code (that you deleted) as a test for clicking the header widget.

I will push a change with these changes, let me know what you think.

Looks good to me.