问题
I see only the first 20 (of 128) data rows when I call table.setData. How can I expose all 128? I don't see any controls for this. The 20 rows display with much blank space underneath, so I don't think it's an issue of room. When I open or dismiss Chrome developer tools, all the rows show up, but collapsed. If I hit F12 (toggle developer tools) twice, everything is fine. (This is in a stand-alone configuration, without other JavaScript plugins.) My constructor and (truncated) data are appended.
Tabulator v4.0.1
Chrome Version 61.0.3163.100 (Official Build) (64-bit)
{
"initialSort": [
{
"column": "WillCo_Eff",
"dir": "desc"
},
{
"column": "Which_Eff",
"dir": "desc"
},
{
"column": "VeryVeryVeryLongWay_Eff",
"dir": "desc"
},
{
"column": "Roger_Eff",
"dir": "desc"
},
{
"column": "Over_Eff",
"dir": "desc"
},
{
"column": "Out_Eff",
"dir": "desc"
},
{
"column": "Any_Eff",
"dir": "desc"
}
],
"columnVertAlign": "bottom",
"height": 5180,
"layout": "fitColumns",
"columns": [
{
"title": "Parents",
"columns": [
{
"title": "Any_Eff",
"field": "Any_Eff",
"align": "center",
"sorter": "string",
"headerSort": false
},
{
"title": "Out_Eff",
"field": "Out_Eff",
"align": "center",
"sorter": "string",
"headerSort": false
},
{
"title": "Over_Eff",
"field": "Over_Eff",
"align": "center",
"sorter": "string",
"headerSort": false
},
{
"title": "Roger_Eff",
"field": "Roger_Eff",
"align": "center",
"sorter": "string",
"headerSort": false
},
{
"title": "VeryVeryVeryLongWay_Eff",
"field": "VeryVeryVeryLongWay_Eff",
"align": "center",
"sorter": "string",
"headerSort": false
},
{
"title": "Which_Eff",
"field": "Which_Eff",
"align": "center",
"sorter": "string",
"headerSort": false
},
{
"title": "WillCo_Eff",
"field": "WillCo_Eff",
"align": "center",
"sorter": "string",
"headerSort": false
}
]
},
{
"title": "Multi_1_Eff",
"width": 150,
"columns": [
{
"title": "T",
"field": "pTrue",
"align": "center",
"headerSort": false
},
{
"title": "<i>F</i>",
"field": "pFalse",
"align": "center",
"headerSort": false
}
]
},
{
"title": "Belief",
"columns": [
{
"title": "odds",
"field": "odds",
"align": "center",
"headerSort": false
},
{
"title": "log<sub>2</sub> odds",
"field": "log2odds",
"align": "center",
"headerSort": false
}
]
}
]
}
foo.js:273
[
{
"id": 0,
"pTrue": 0.9,
"pFalse": 0.09999999999999998,
"odds": 9.000000000000002,
"log2odds": 3.1699250014423126,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "T",
"Roger_Eff": "T",
"VeryVeryVeryLongWay_Eff": "T",
"Which_Eff": "T",
"WillCo_Eff": "T"
},
{
"id": 1,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "T",
"Roger_Eff": "T",
"VeryVeryVeryLongWay_Eff": "T",
"Which_Eff": "T",
"WillCo_Eff": "F"
},
{
"id": 2,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "T",
"Roger_Eff": "T",
"VeryVeryVeryLongWay_Eff": "T",
"Which_Eff": "F",
"WillCo_Eff": "T"
},
{
"id": 3,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "T",
"Roger_Eff": "T",
"VeryVeryVeryLongWay_Eff": "T",
"Which_Eff": "F",
"WillCo_Eff": "F"
},
{
"id": 4,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "T",
"Roger_Eff": "T",
"VeryVeryVeryLongWay_Eff": "F",
"Which_Eff": "T",
"WillCo_Eff": "T"
},
{
"id": 5,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "T",
"Roger_Eff": "T",
"VeryVeryVeryLongWay_Eff": "F",
"Which_Eff": "T",
"WillCo_Eff": "F"
},
{
"id": 6,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "T",
"Roger_Eff": "T",
"VeryVeryVeryLongWay_Eff": "F",
"Which_Eff": "F",
"WillCo_Eff": "T"
},
{
"id": 7,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "T",
"Roger_Eff": "T",
"VeryVeryVeryLongWay_Eff": "F",
"Which_Eff": "F",
"WillCo_Eff": "F"
},
{
"id": 8,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "T",
"Roger_Eff": "F",
"VeryVeryVeryLongWay_Eff": "T",
"Which_Eff": "T",
"WillCo_Eff": "T"
},
{
"id": 9,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "T",
"Roger_Eff": "F",
"VeryVeryVeryLongWay_Eff": "T",
"Which_Eff": "T",
"WillCo_Eff": "F"
},
{
"id": 10,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "T",
"Roger_Eff": "F",
"VeryVeryVeryLongWay_Eff": "T",
"Which_Eff": "F",
"WillCo_Eff": "T"
},
{
"id": 11,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "T",
"Roger_Eff": "F",
"VeryVeryVeryLongWay_Eff": "T",
"Which_Eff": "F",
"WillCo_Eff": "F"
},
{
"id": 12,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "T",
"Roger_Eff": "F",
"VeryVeryVeryLongWay_Eff": "F",
"Which_Eff": "T",
"WillCo_Eff": "T"
},
{
"id": 13,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "T",
"Roger_Eff": "F",
"VeryVeryVeryLongWay_Eff": "F",
"Which_Eff": "T",
"WillCo_Eff": "F"
},
{
"id": 14,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "T",
"Roger_Eff": "F",
"VeryVeryVeryLongWay_Eff": "F",
"Which_Eff": "F",
"WillCo_Eff": "T"
},
{
"id": 15,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "T",
"Roger_Eff": "F",
"VeryVeryVeryLongWay_Eff": "F",
"Which_Eff": "F",
"WillCo_Eff": "F"
},
{
"id": 16,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "F",
"Roger_Eff": "T",
"VeryVeryVeryLongWay_Eff": "T",
"Which_Eff": "T",
"WillCo_Eff": "T"
},
{
"id": 17,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "F",
"Roger_Eff": "T",
"VeryVeryVeryLongWay_Eff": "T",
"Which_Eff": "T",
"WillCo_Eff": "F"
},
{
"id": 18,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "F",
"Roger_Eff": "T",
"VeryVeryVeryLongWay_Eff": "T",
"Which_Eff": "F",
"WillCo_Eff": "T"
},
{
"id": 19,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "F",
"Roger_Eff": "T",
"VeryVeryVeryLongWay_Eff": "T",
"Which_Eff": "F",
"WillCo_Eff": "F"
},
{
"id": 20,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "F",
"Roger_Eff": "T",
"VeryVeryVeryLongWay_Eff": "F",
"Which_Eff": "T",
"WillCo_Eff": "T"
},
{
"id": 21,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "F",
"Roger_Eff": "T",
"VeryVeryVeryLongWay_Eff": "F",
"Which_Eff": "T",
"WillCo_Eff": "F"
},
{
"id": 22,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "F",
"Roger_Eff": "T",
"VeryVeryVeryLongWay_Eff": "F",
"Which_Eff": "F",
"WillCo_Eff": "T"
},
{
"id": 23,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "F",
"Roger_Eff": "T",
"VeryVeryVeryLongWay_Eff": "F",
"Which_Eff": "F",
"WillCo_Eff": "F"
},
{
"id": 24,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "F",
"Roger_Eff": "F",
"VeryVeryVeryLongWay_Eff": "T",
"Which_Eff": "T",
"WillCo_Eff": "T"
},
{
"id": 25,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "F",
"Roger_Eff": "F",
"VeryVeryVeryLongWay_Eff": "T",
"Which_Eff": "T",
"WillCo_Eff": "F"
},
{
"id": 26,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "F",
"Roger_Eff": "F",
"VeryVeryVeryLongWay_Eff": "T",
"Which_Eff": "F",
"WillCo_Eff": "T"
},
{
"id": 27,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "F",
"Roger_Eff": "F",
"VeryVeryVeryLongWay_Eff": "T",
"Which_Eff": "F",
"WillCo_Eff": "F"
},
{
"id": 28,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "F",
"Roger_Eff": "F",
"VeryVeryVeryLongWay_Eff": "F",
"Which_Eff": "T",
"WillCo_Eff": "T"
},
{
"id": 29,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "F",
"Roger_Eff": "F",
"VeryVeryVeryLongWay_Eff": "F",
"Which_Eff": "T",
"WillCo_Eff": "F"
},
{
"id": 30,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "F",
"Roger_Eff": "F",
"VeryVeryVeryLongWay_Eff": "F",
"Which_Eff": "F",
"WillCo_Eff": "T"
},
{
"id": 31,
"pTrue": 0,
"pFalse": 1,
"odds": 0,
"log2odds": null,
"Any_Eff": "T",
"Out_Eff": "T",
"Over_Eff": "F",
"Roger_Eff": "F",
"VeryVeryVeryLongWay_Eff": "F",
"Which_Eff": "F",
"WillCo_Eff": "F"
},
{
"id": 32,
"pTrue": 0.1125,
"pFalse": 0.8875,
"odds": 0.1267605633802817,
"log2odds": -2.9798221180623696,
"Any_Eff": "T",
"Out_Eff": "F",
"Over_Eff": "T",
"Roger_Eff": "T",
"VeryVeryVeryLongWay_Eff": "T",
"Which_Eff": "T",
"WillCo_Eff": "T"
}
]
回答1:
You seem to have set your table height to an enormous value of 5180px so it has probably overflowed the height of the container.
If you set it to a smaller value, say 300, or you set it to "100%" then it will only take up that much space and a scroll bar will appear.
"height": 300,
or
"height": "100%",
Alternatively, if you want to handle the scroll behavior if you specify no height it will take the full height of all the rows in the table.
回答2:
See Oli Folkerd's comment---problem was that the table's DOM element was not visible when the table was created.
来源:https://stackoverflow.com/questions/52615772/expose-more-rows