ijlyttle / bsplus

Shiny and R Markdown addons to Bootstrap 3
http://ijlyttle.github.io/bsplus/
Other
146 stars 23 forks source link

Question: How to embed help links in a datatable #41

Closed iainmwallace closed 4 years ago

iainmwallace commented 7 years ago

Hi,

Great package!

I was wondering if you have any examples on how to annotate the columns in a datatable (https://rstudio.github.io/DT/) with help text similar to your input help documentation.

It would be really useful to be able to put a more detailed column definition with a modal or tool tip.

Thanks,

Iain

ijlyttle commented 7 years ago

Hi Iain (great name),

Thanks for the kind words!

I have not had time to look at this in detail, but I did have a quick look at the DT documentation for the datatable() function. There is a colnames argument to customize the header - if you can supply HTML to that argument, then you should be able to embed an icon that links to a modal, tooltip or popover.

Hope this helps!

ijlyttle commented 7 years ago

This starts to get at a solution: https://gist.github.com/ijlyttle/a9a5796b93c6f141d7a6b1e516b4971d

It is nowhere near finished, but maybe can help us shake loose some ideas.

iainmwallace commented 7 years ago

Thanks, that makes clear the approach.

Is there a step I need to do to enable the bootstrap theme? The output doesn't look correct. I have a clean install with this wonderful AMI ( http://www.louisaslett.com/RStudio_AMI/) + the libraries indicated in the gist.

On Sat, May 27, 2017 at 4:30 PM, Ian Lyttle notifications@github.com wrote:

This starts to get at a solution: https://gist.github.com/ijlyttle/ a9a5796b93c6f141d7a6b1e516b4971d

It is nowhere near finished, but maybe can help us shake loose some ideas.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ijlyttle/bsplus/issues/41#issuecomment-304474946, or mute the thread https://github.com/notifications/unsubscribe-auth/AML4Vq-R9BHS-v5r9kspJVv4MJ8YScRAks5r-IfrgaJpZM4NeqLX .

iainmwallace commented 7 years ago

Works when I bundle it up as a shiny app... https://iainmwallace.shinyapps.io/tooltips/

Thanks! Hope you have a great memorial day :)

On Sun, May 28, 2017 at 1:59 PM, Iain Wallace iain.m.wallace@gmail.com wrote:

Thanks, that makes clear the approach.

Is there a step I need to do to enable the bootstrap theme? The output doesn't look correct. I have a clean install with this wonderful AMI ( http://www.louisaslett.com/RStudio_AMI/) + the libraries indicated in the gist.

On Sat, May 27, 2017 at 4:30 PM, Ian Lyttle notifications@github.com wrote:

This starts to get at a solution: https://gist.github.com/ijlytt le/a9a5796b93c6f141d7a6b1e516b4971d

It is nowhere near finished, but maybe can help us shake loose some ideas.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ijlyttle/bsplus/issues/41#issuecomment-304474946, or mute the thread https://github.com/notifications/unsubscribe-auth/AML4Vq-R9BHS-v5r9kspJVv4MJ8YScRAks5r-IfrgaJpZM4NeqLX .