Lots of gibberish in link when using bookmarkButton() in a shiny app with DT::datatable()

Hi!

I created a shiny app to follow the COVID numbers: https://gorkang.shinyapps.io/2020-corona/ and included a bookmark button so it would be easy to share a specific set of countries and parameters. Given the parameters in the sidebar, the app creates a ggplot() and a DT::datatable().

The issue is that the link created by bookmarkButton() includes lots of unnecessary info about the table.

I would expect the bookmark to be:

https://gorkang.shinyapps.io/2020-corona/?inputs&min_n=100&countries_plot=%5B%22South%20Korea%22%2C%22Australia%22%2C%22Germany%22%2C%22US%22%2C%22France%22%2C%22Iran%22%2C%22Italy%22%2C%22United%20Kingdom%22%2C%22Spain%22%2C%22Switzerland%22%2C%22Denmark%22%5D&cases_deaths=%22cases%22&log_scale=true&growth=30

But with the datatable in the link becomes:

https://gorkang.shinyapps.io/2020-corona/?inputs&min_n=100&countries_plot=%5B%22South%20Korea%22%2C%22Australia%22%2C%22Germany%22%2C%22US%22%2C%22France%22%2C%22Iran%22%2C%22Italy%22%2C%22United%20Kingdom%22%2C%22Spain%22%2C%22Switzerland%22%2C%22Denmark%22%5D&mytable_rows_current=%5B1%2C2%2C3%2C4%2C5%2C6%2C7%2C8%2C9%2C10%5D&mytable_rows_all=%5B1%2C2%2C3%2C4%2C5%2C6%2C7%2C8%2C9%2C10%2C11%2C12%2C13%2C14%2C15%2C16%2C17%2C18%2C19%2C20%2C21%2C22%2C23%2C24%2C25%2C26%2C27%2C28%2C29%2C30%2C31%2C32%2C33%2C34%2C35%2C36%2C37%2C38%2C39%2C40%2C41%2C42%2C43%2C44%2C45%2C46%2C47%2C48%2C49%2C50%2C51%2C52%2C53%2C54%2C55%2C56%2C57%2C58%2C59%2C60%2C61%2C62%2C63%2C64%2C65%2C66%2C67%2C68%2C69%2C70%2C71%2C72%2C73%2C74%2C75%2C76%2C77%2C78%2C79%2C80%2C81%2C82%2C83%2C84%2C85%2C86%2C87%2C88%2C89%2C90%2C91%2C92%2C93%2C94%2C95%2C96%2C97%2C98%2C99%2C100%2C101%2C102%2C103%2C104%2C105%2C106%2C107%2C108%2C109%2C110%2C111%2C112%2C113%2C114%2C115%2C116%2C117%2C118%2C119%2C120%2C121%2C122%2C123%2C124%2C125%2C126%2C127%2C128%2C129%2C130%2C131%2C132%2C133%2C134%2C135%2C136%2C137%2C138%2C139%2C140%2C141%2C142%2C143%2C144%2C145%2C146%2C147%2C148%2C149%2C150%2C151%2C152%2C153%2C154%2C155%2C156%2C157%2C158%2C159%2C160%2C161%2C162%2C163%2C164%2C165%2C166%2C167%2C168%2C169%2C170%2C171%2C172%2C173%2C174%2C175%2C176%2C177%2C178%2C179%2C180%5D&mytable_search_columns=%5B%22%22%2C%22%22%2C%22%22%2C%22%22%2C%22%22%2C%22%22%2C%22%22%2C%22%22%5D&log_scale=true&mytable_state=null&cases_deaths=%22cases%22&mytable_search=%22%22&mytable_cell_clicked=%7B%7D&growth=30&mytable_rows_selected=null

Any clues about how to avoid the datatable specific info to appear in the link?

Thanks!

Nevermind! I found the response in here: https://stackoverflow.com/questions/42581952/setbookmarkexclude-on-a-shiny-app-with-dt-data-table

setBookmarkExclude(
c('mytable_rows_current',
'mytable_rows_all',
'mytable_state',
'mytable_search_column',
'mytable_search',
'mytable_cell_clicked',
'mytable_rows_selected'))

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.