Skip to content
Advertisement

Tag: datatables

How to access user input from radio buttons (made with a JS callback) in shiny DT and have different JS elements in one DT?

I am trying to combine two commonly shared JS callbacks into one R datatable shiny app (having radio buttons (see https://yihui.shinyapps.io/DT-radio/ and Extracting user input values from radio buttons in Shiny DT into a dataframe or list) and having nested rows in a child/parent table (see https://stackoverflow.com/a/56599838/10624798 and many other places). Individually they both work, but not together. I am

Jquery +datatables causing CSP errors for inline style

I have been trying to get rid of the unsafe-inline from the CSP style-src headers as it is vulnerable. While removing this, I am getting below errors in jQuery execution in chrome: Refused to apply inline style because it violates the following Content Security Policy directive: “style-src ‘self’ ‘nonce-TXYxR0tlamZ1emk2a3Y4RHFwdTdTZ0JaR1R2TTdEaUk=’ ‘unsafe-eval’ “. Either the ‘unsafe-inline’ keyword, a hash (‘sha256-Z0MkpGRk0/9QW+7eJ/G1D//1i6WKVbat+HlIwkiFln4=’), or a

How to know index of DataTable row just added?

I am using the DataTables jQuery plugin version 1.10.22. I add a row to DataTable, like the following. That works. A new row is added to the table, and the data I provided is displayed. But, immediately after adding the row, I would like to know the row index of that row I just added. How do I determine that?

Advertisement