Comments (8)
Could you give a reproducible example? I do not see such a problem on this example page: http://rstudio.github.io/DT/extensions.html
from dt.
Thanks for your response! Here are links to the app (see the Filtered Table tab) without responsive: https://claney.shinyapps.io/dataAvailabilityApp/ - and with responsive: https://claney.shinyapps.io/neonDataAvailability-responsive/. The code in server.R is only different in that extensions = 'Scroller' in the first, and extensions = c('Scroller', 'Responsive') in the second. The full code for the shiny app is in a private repo but here is the code I use to render the filtered table:
output$filtertable <- DT::renderDataTable(
DT::datatable(dp2, rownames = FALSE, extensions = c('Scroller','Responsive'),
options = list(pageLength = 200,
pagingType = "full_numbers",
deferRender = TRUE,
dom = 'frtiSp',
order = list(list(0, 'asc'), list(2, 'asc')),
tableTools = list(sSwfPath = copySWF()),
scrollY = 400,
scrollCollapse = TRUE
)))
If you need more than this, I can send you code privately.
from dt.
Yes, I can see the second app is slower when I type in the search box, but it is not too bad. I guess the delay is on the magnitude of ~300 milliseconds. Unfortunately, I'm afraid I won't be able to help you with this particular issue, since I'm not the author of the Responsive extension, and I do not know how to make it faster. Is there a reason that you want to use this extension?
from dt.
It is nice for viewing the table on small screens, like phones, but of course there the delay is even more noticeable, on the order of a second per letter. It is more important that the users can quickly filter the table via search terms than see a condensed table, so for now I will not use the responsive functionality. Perhaps I can drop the extension author a line. Thank you for your help!
from dt.
That will be nice. Thanks for your understanding!
from dt.
This may be a DT issue after all.
In my Shiny app, I'm seeing this behavior with DT::renderDataTable and DT::datatable and responsive turned on - about 1s per letter in >2000 entry table on MBPro i7 16gb locally.
Duplicating the table but rendering it with shiny::renderDataTable on the same page - there is no delay in searching. And responsive is turned on via the options list instead, as seen below.
And there is actually a (very) slight delay in searching the DT table compared to the shiny table even without the responsive setting.
Since I'm not loading a separate dataTables.responsive.js
they're presumably using the same JS library.
Unfortunately, I can't share the full app. The relevant code from server.R:
output$full_table <- DT::renderDataTable({
data <- data_full()
...
DT::datatable(data,
class="table table-striped table-hover table-condensed",
rownames = FALSE,
escape = FALSE,
filter = "bottom",
extensions = c('ColReorder','Responsive'),
options = list(
"pageLength" = 10,
dom = 'Rlfrtip')
)
})
output$full_table2 <- shiny::renderDataTable({
data <- data_full()
...
data
}, options = list(
"orderClasses" = FALSE,
"autoWidth" = FALSE,
"responsive" = TRUE,
"pageLength" = 10,
"paging" = TRUE),
"escape" = FALSE
)
from dt.
@vasiliosz That is a different case. Shiny uses server-side processing by default, and DT uses client-side processing by default. Please see
from dt.
Thanks @yihui. My oversight, it works as expected.
from dt.
Related Issues (20)
- Scroller extension incompatible with dark themes
- two "remove" icons in filtered filter = 'top'? HOT 2
- plugins = 'natural' not working for DT v > .27? HOT 3
- 503 error with very large http cookies
- Issue using `replaceData()` with `dataTableProxy()` HOT 4
- `formatStyle()` doesn't work with Bootstrap 5 HOT 5
- Cannot be rendered correctly in Shiny app with tailwind css HOT 3
- some selected rows loose bg (bootstrap 5, rowGroup extension, selection)
- Selection of multiple levels HOT 2
- [Accessibility] Trigger custom row select from Javascript callback HOT 11
- R shiny DT table with pagination and drop down list inside table and being able to save the entire updated table as csv file HOT 5
- DT 0.31 breaks previous 'ignore colnames' behavior during `replaceData()` HOT 1
- RowGroup extension with rownames = TRUE HOT 6
- updateSearch does not update numeric slider values
- datatable column filters clash with shiny::selectizeInput when invoked first HOT 4
- DateTime date picker CSS is broken in SearchBuilder
- Disabling editable table by row (and not just by column)
- autoFill extension returns `NaN` instead of incrementing HOT 5
- Docs do not state whether shift+click works for multi-row selection
- #828 breaks maintaining selected columns upon re-render HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dt.