Can't get scroller to work

Can't get scroller to work

kombatkombat Posts: 15Questions: 5Answers: 0
edited August 2013 in DataTables 1.9
The scroller isn't working for me. I'm using the datatable as an autocompleter. I'm doing absolute positioning on it so that it appears directly below the input associated with it, but other than that I think it's a typical datatable. Here is the initialize code before I try to add a scroller.

[code]
self.table.dataTable({
bLengthChange: false,
bPaginate: false,
bInfo: false,
bFilter: false,
bSort: false,
aaData: mydata,
aoColumnDefs: columnDefs
});
[/code]

When I try to add a scroller by adding sScrollY: '300', it completely janks the table. It moves the table and the input field over to the right, and doesn't add any scroll bars. The table still goes off the bottom of the screen.

If you need any other info let me know.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    edited August 2013
    Please link to a test case: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read
  • kombatkombat Posts: 15Questions: 5Answers: 0
    http://live.datatables.net/akacic/2/edit

    I'm fairly certain it's a CSS issue. As is, I commented out the property to enable scrolling so you can see what's normal. Imagine Document ID is an autocomplete field, as the user types, data is retrieved and the datatable populated. It appears as shown, directly underneath the input box. I left out other CSS that makes the table overlay anything it's over. I left the other input visible just to give an idea again of what's going on.

    If you uncomment the line to enable scrolling, in this example the only problem is that it doesn't create the scroll. I have other problems, like it throws the label, input, and table over to the right, probably more CSS issues. Hopefully this will be enough to get me in the right direction at least. Thanks.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    If you remove the position absolute on the table, then it springs into action. That's because its taking it outside the flow of the rest of the DataTables DOM structure, messing everything up :-)

    Allan
This discussion has been closed.