Skip to content
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

DataTables warning: table id=DataTables_Table_0 - Invalid JSON response #46

Closed
vnijs opened this issue Apr 11, 2015 · 6 comments
Closed
Labels

Comments

@vnijs
Copy link
Contributor

vnijs commented Apr 11, 2015

When you enter a search term that is not found you get an 'invalid JSON response' warning from DataTables. Same applies if you select a factor level that is not in the sub-set of data that was already filtered. As an example, type an x in the search box at: https://vnijs.shinyapps.io/base

Code used

@vnijs
Copy link
Contributor Author

vnijs commented Apr 11, 2015

Looks like this issue is not present with the development release of Shiny.

@yihui
Copy link
Member

yihui commented Apr 12, 2015

Yeah, at the moment I'd recommend you to use the development version of shiny. You are also welcome to test a change that we will introduce soon: ramnathv/htmlwidgets#28

devtools::install_github(c('jeroenooms/jsonlite', 'rstudio/shiny', 'yihui/htmlwidgets@jsonlite'))

It should not really affect DT, but I have some ugly fixes for RJSONIO in DT that I want to remove as soon as the new version of htmlwidgets is released.

@vnijs
Copy link
Contributor Author

vnijs commented Apr 12, 2015

Ok. With try on shinyapps tomorrow

On Sat, Apr 11, 2015 at 8:18 PM, Yihui Xie [email protected]
wrote:

Yeah, at the moment I'd recommend you to use the development version of shiny. You are also welcome to test a change that we will introduce soon: ramnathv/htmlwidgets#28

devtools::install_github(c('jeroenooms/jsonlite', 'rstudio/shiny', 'yihui/htmlwidgets@jsonlite'))

It should not really affect DT, but I have some ugly fixes for RJSONIO in DT that I want to remove as soon as the new version of htmlwidgets is released.

Reply to this email directly or view it on GitHub:
#46 (comment)

@yihui yihui added the question label Apr 12, 2015
@vnijs
Copy link
Contributor Author

vnijs commented Apr 12, 2015

I installed the latest jsonlite, shiny, and htmlwidgetsfrom github. Works fine locally and on shinyapps.io. Nice! A couple of notes:

  1. There is quite a bit of padding for the filter boxes. CSS adjustments below helped
  2. Hiding the clear icon would be great as well
  3. Without steps like the shiny sliders have, getting to a desired value is a lot harder than I thought it would be. For dates, perhaps a date-picker could be an option. For numerics, perhaps the popup could allow use of arrow keys and/or the ability to edit the range manually in the popup as well.
  4. The overall-search box (top-right) does not have class form-control so the styling is a bit different
  5. With the selectize conflict you mentioned using filter boxes with "top" is not really an option at the moment if the data has factors
  6. I know you can access the selected rows in DT. However, it would be useful to have access to the user inputs as well. I recall we discussed this before DT was moved to rstudio/DT but I cannot find the (github) conversation. I assume I should be looking in DT/R/shiny.R. The reason I want this is to save filters. You can save the row-selection information but then you have no idea how that filter was constructed. If you could combine the information from the DT search components into a dplyr-filter you can retrace what you did.

table.dataTable tfoot td, table.dataTable thead td {
padding-left: 0px;
padding-right: 0px;
}

@vnijs
Copy link
Contributor Author

vnijs commented Apr 12, 2015

@PHILL class = "compact" is nice but I was referring more to the padding in and around the filter boxes. "compact" doesn't seem to affect that.

@phillc73
Copy link

Yes, I must admit I realised that after posting my comment, which is why
I deleted it. Sorry.

On 12/04/15 22:58, Vincent Nijs wrote:

@PHILL https://github.com/phill class = "compact" is nice but I was
referring more to the padding in and around the filter boxes.
"compact" doesn't seem to affect that.


Reply to this email directly or view it on GitHub
#46 (comment).

@yihui yihui closed this as completed in 5fd0221 May 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants