DT problems

131 views
Skip to first unread message

Michael Frank

unread,
Jul 1, 2015, 7:52:19 AM7/1/15
to shiny-...@googlegroups.com
Hi,

I use DT with shiny 0.12 a lot in smaller projects. Now I wanted to change the datatables in my biggest project. Unfortunately after switching the first table it isnt working anymore. I can see, that the table is rendered differently - but it doesnt react to clicks on filter or paging buttons. Rending of paging buttons looks strange as well (see picture). Usually the buttons are close together and follow the shinythemes theme (in this case spacelab).



Any ideas what I can do or what I do wrong?

Best,
Michael

Yihui Xie

unread,
Jul 2, 2015, 2:24:29 AM7/2/15
to Michael Frank, shiny-discuss
Did you apply the Bootstrap style to the table?
http://rstudio.github.io/DT/005-bootstrap.html

The spacelab theme seems to work well in this minimal R Markdown document:

---
title: "Test"
output:
html_document:
theme: spacelab
---

## Test

```{r}
DT::datatable(iris, style = 'bootstrap')
```


Regards,
Yihui

On Wed, Jul 1, 2015 at 6:52 AM, Michael Frank
<dr.micha...@googlemail.com> wrote:
>
> Hi,
>
> I use DT with shiny 0.12 a lot in smaller projects. Now I wanted to change the datatables in my biggest project. Unfortunately after switching the first table it isnt working anymore. I can see, that the table is rendered differently - but it doesnt react to clicks on filter or paging buttons. Rending of paging buttons looks strange as well (see picture). Usually the buttons are close together and follow the shinythemes theme (in this case spacelab).
>
>
>
> Any ideas what I can do or what I do wrong?
>
> Best,
> Michael
>
> --
> You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/952c23e1-3b3a-4de4-866b-05e4ff64bcf6%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Michael Frank

unread,
Jul 4, 2015, 9:02:52 AM7/4/15
to shiny-...@googlegroups.com, dr.micha...@googlemail.com
Spacelab is not the problem. I use it in other project together with DT as well and there it works fine. I just mentioned that so that you can see on the screenshot that the table is not drawn correctly. In the other projects the paging buttons look very different.

I tried and set the style to bootstrap. Unfortunately no change.

I tried now every combinations with all other libraries included, but that seems not to be the problem. Is there some memory limitation in shiny? The tables itself are not big, but I have a lot of data in memory. Perhaps there is some memory problem?

Best,
Michael

Michael Frank

unread,
Jul 4, 2015, 9:17:02 AM7/4/15
to shiny-...@googlegroups.com
Hi all,

I want to describe the problem in a little bit more detail: I have mainly to problems: The search field in the datatable is not working and the paging buttons have no effect on the displayed data. My code looks like this

  DT::datatable(tmp, style = 'bootstrap', class = 'table-condensed', rownames = TRUE, selection = "single",
                colnames=c("Name", "Customer", "Project", "last edited"),
                options = list(pageLength=5, dom="ftp"))

It is used in a DT::renderDataTable that responds to a DT::dataTableOutput. tmp is a data.table object. This one small - approx 50 rows.

Best,
Michael

Yihui Xie

unread,
Jul 5, 2015, 1:23:17 AM7/5/15
to Michael Frank, shiny-discuss
I don't think it is a memory problem. Can you provide a minimal
self-contained reproducible example?

Regards,
Yihui
>> Any ideas what I can do or what I do wrong?
>>
>> Best,
>> Michael
>
> --
> You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/46ceb145-a590-4d3b-b9b1-8ede474f9abd%40googlegroups.com.

Michael Frank

unread,
Aug 4, 2015, 3:18:20 AM8/4/15
to Shiny - Web Framework for R, dr.micha...@googlemail.com
I solved that one: The problem was that I tried to move carefully to DT. In that way I used shiny data tables and DT data tables at the same time. That doesnt work. I assume you are aware of that - I am now.

Best,
Michael
Reply all
Reply to author
Forward
0 new messages