"resizable: true" doesn't work in Browser (but works in html editors) #1398
Unanswered
Pedro-Leitek
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to create a table using gridjs. Everything works fine in liveweave when I resize the window, but when I download the draft and open it on chrome, the table columns don't resize responsively. It looks like the columns are fixed in size.
Here is the code:
`
`
`
new gridjs.Grid({
columns: ["Name", "Email", "Phone Number"],
sort: true,
pagination: false,
fixedHeader: true,
resizable: true,
width: "100%",
height: "100%",
//width: document.getElementById("table").clientWidth,
data: [
["John", "john@example.com", "(353) 01 222 3333"],
["Mark", "mark@gmail.com", "(01) 22 888 4444"],
["Eoin", "eoin@gmail.com", "0097 22 654 00033"],
["Sarah", "sarahcdd@gmail.com", "+322 876 1233"],
["Afshin", "afshin@mail.com", "(353) 22 87 8356"],
["Afshin", "afshin@mail.com", "(353) 22 87 8356"],
["Afshin", "afshin@mail.com", "(353) 22 87 8356"],
["Afshin", "afshin@mail.com", "(353) 22 87 8356"]
],
style: {
table: {
height: "100%"
},
th: {
'text-align': 'center',
'font-size': '1vw'
},
td: {
'text-align': 'center',
'padding': 0,
'font-size': '1vw'
}).render(document.getElementById("table"));
var grid=document.getElementsByClassName("gridjs gridjs-container");
grid[0].setAttribute("style", "width:100%; height:100%;");
`
Beta Was this translation helpful? Give feedback.
All reactions