ThomasSiegmund / D3TableFilter

A table widget based on Max Guglielmi's "HTML Table Filter Generator" and D3.js
Other
65 stars 17 forks source link

Hide columns by default and have dropdown cells #12

Open RCesarSilva opened 8 years ago

RCesarSilva commented 8 years ago

Hello Thomas.

I've been using you D3TableFilter in one of my personal projects and it's really great.

I've trying to implement two features but, alas, without success.

The features I would like to implement are:

1) I would like to implement is to hide certain columns by default (I know the filter has the ability to do this after launching the Shiny app)

2) have some columns have a limited input (to prevent errors of writing) and so have a dropdown list to choose from the predefined inputs.

I am familiar with R but I'm learning JS and HTML as I go along.

Could you provide me with an example or point to documentation where I can implement this?

Thank you. Best Regards,

ThomasSiegmund commented 8 years ago

Hi, sorry for the late reply, did not have time to look into this earlier. For 1) you obviously have to enable the ColsVisibility extension. In the table properties use showHide_cols_at_start

tableProps <- list(
   ...
      showHide_cols_at_start = c(3, 5),  
   ...
)

For the second problem I don't have a solution at the moment.

Best

Thomas