-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: DT table ajax error on wrong column being selected. #284
Comments
data tables dialog still pops up. I changed x biomarker to F2974907 BASE and that didn't trigger it but when I changed y biomarker to AST AVAL it was triggered. when I dismissed the dialog then the plot was created and brushing did work. the table does inlucde the expected variables from the new selection but the data table warning is referring to the default y biomarker value combination of Albumin and AVAL. so something is stuck in the reactivity chain or the environment still |
I guess it's a bit random and I can trigger it from a time to time when I keep changing inputs very fast. Googled it and found this https://datatables.net/manual/tech-notes/7 but it's not very helpful. It says there is an internal error, so maybe processing is happening way too fast. |
My hypothesis is that
|
thanks for looking into this. I guess it's a gremlin that we can't address easily. I can add a comment about this in the user guide tab of our apps but no one reads the user guide anyway. 🤣 what do you want to do with this issue? close? |
removed priority since you think it's a random gremlin and google suggests internal error. |
As @m7pr pointed out, I only see the dialog boxes when I keep changing inputs consecutively. Acceptance Criteria
|
I think the issue will remain as this is DataTable issue, but we can try to maybe set some options so that the error/warning is not displayed on the app when this happens. I guess that would be the ultimate solution. We can not do much with the gremlin, but we may at least hide it and don't display it (if possible!). |
Hey, had a chance to deeply investigate the issue today. CC @donyunardi let me know your thoughts on this. HistoryThe same issue has been reported for the last 10 years :) (see comments on shiny/rstudio from 2014) The causeThis is a know issue of JavaScript DataTables (which is the source for
This means that the changes of the input are way too frequent for the DataTable and it throws a warning because it can not process that many data at the same time. SolutionsThere are few solutions that we can discuss, to get things sorted out. Solution 1You can hide this alert warning for a particular DT::datatable(iris, callback = DT::JS("$.fn.dataTable.ext.errMode = 'none';")) However this requires updates in all Solution 2We can introduce a global change by specifying the below snippet in tags$head(
tags$script(
'$(document).ready(function() {
$.fn.dataTable.ext.errMode = "none";
})'
)
)
|
Created a PR that only affects this package #310 |
Thanks for looking into this @m7pr Since hiding it might not be the most optimal solution, I’m hesitant to apply it in the teal framework, and I’m also unsure if it’s safe to do so. From what I understand, this issue relates to processing time when generating complex tables or plots, where users interact with inputs before the calculation is complete. This tells me that the problem lies within the module itself when For now, I would prefer to limit the scope and address this issue only in the package where it has been reported. So, I would vote for solution 1.
I guess we could go this route, or we could focus on addressing only the problematic module, specifically, the one that requires more time to process the output. We only have a handful for teal.goshawk so perhaps this is okay. |
Solution for #284 that do not pop-up AJAX warnings from JavaScript DataTable when computations happens too often and rendering is behind the state of the data. This adds a callback behavior for `DT::datatable`. We also tested the global setup of this behavior in teal but we were unable to include javascript in a way that it is executed after the object is created. Other modules in other packages don't really need that as they have better reactivity handling. The modules in teal.goshawk have very much reactivitiy and could be refactored one day but that's a bigger project. --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
What happened?
In the correlation plot, when the x/y-axis biomarker is changed for the first time, an AJAX error occurs indicating the column is not found. This issue is related to brush_data. Upon investigation, the intermediate output appears to be correct, and the DataTable (DT) is being updated properly.
sessionInfo()
No response
Relevant log output
No response
Code of Conduct
Contribution Guidelines
Security Policy
The text was updated successfully, but these errors were encountered: