Comments (3)
I'm sorry for answering so late! Having a busy time right now.
You surely can adjust the solumn widths, you just have to move the parameter to the cols_param-list.
shinyApp(
ui = fluidPage(dq_handsontable_output("myTable", 9L)),
server = function(input, output, session) {
hw <- c("Hello", "my", "funny", "world!")
data <- data.frame(A = rep(hw, 100L), B = hw[c(2:4, 100L)], C = 1:100, D = 100:1)
dq_render_handsontable("myTable", data,
filters = c("Sel", "Text", NA, "Auto"), sorting = TRUE,
page_size = c(17L, 5L, 500L, 1000L),
table_param = list(rowHeaders=FALSE),
cols_param = list(colWidths=c(150, 250, 50, 50)),
col_param = list(list(col = 3L, format = "0.00")),
cell_param = list(list(row = 2:9, col = 2L, readOnly = TRUE)),
width_align = TRUE
)
}
)
Please note that horizontal stretching is activated by default, to disable this, use stretchH = "none" in the table parameters. And you should also activate width_align, to make sure the filters size corresponds to with the columns size.
I hope this helps.
from dqshiny.
Thanks! Very much helps. Your example works for me. I can't believe I didn't try that, but good point on width_align I would not have thought of that.
Does this package have all the same options as rhandsontable? Particularly, would the cell "comment" setting comments by df option work?
Thank you.
from dqshiny.
I'm glad I was able to help.
In general those functions support all options that rhandsontable supports. The comment thing is the only one which is a little bit tricky. I never really used comments, so I just found out ;)
In order to use the comment-parameter you have to enable the contextMenu (I really don't know why), which is disabled in my function by default. You can also define comments for individual cells with the cell_param, but for now you will always have to use to table comment parameter too.
shinyApp(
ui = fluidPage(dq_handsontable_output("myTable", 9L)),
server = function(input, output, session) {
hw <- c("Hello", "my", "funny", "world!")
data <- data.frame(A = rep(hw, 100L), B = hw[c(2:4, 100L)], C = 1:100, D = 100:1)
comments <- data
comments[c(TRUE, FALSE, TRUE),] <- NA
dq_render_handsontable("myTable", data,
filters = c("Sel", "Text", NA, "Auto"), sorting = TRUE,
page_size = c(17L, 5L, 500L, 1000L),
table_param = list(comments = comments, contextMenu = TRUE),
cols_param = list(colWidths = c(150, 250, 50, 50)),
col_param = list(list(col = 3L, format = "0.00")),
cell_param = list(
list(row = 2:9, col = 2L, readOnly = TRUE),
list(row = 1, col = 1, comment = list(value = "This one is important!"))
), width_align = TRUE
)
}
)
I will try to improve this behaviour with the next release.
from dqshiny.
Related Issues (20)
- Choosing option containing apostrophe HOT 2
- Autocomplete with multiple inputs HOT 1
- Can you please submit to CRAN? HOT 1
- Query: Possible to input custom value instead of selecting? HOT 4
- Problem with single quote in `options` HOT 2
- dq_render_handsontable trouble showing all of the column filters HOT 2
- Autocomplete - Changing one autocomplete_input changes all other ones that contain that value in their options HOT 2
- Display full list of options regardless of match? HOT 1
- Autocomplete returns name rather than value & length of name HOT 3
- CRAN Release HOT 3
- Applying parameters with col_param
- Is it possible to set row and column highlight?
- update_autocomplete_input does not work if length for options is 1 unless coercing to list
- bug with reactive data in dq_render_handsontable
- Changing the header background color
- dq_render_handsontable not working when put in module
- Drop down can't be seen when filtering only 1 column
- Output inside dq_accordion is not being rendered
- autocomplete_input misses obvious matches HOT 1
- Undo, Redo and context menu HOT 1
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 dqshiny.