EvHaus / doby-grid

An HTML table element on steroids.
Other
14 stars 5 forks source link

Initializing Doby grid without columns #169

Open ckosmowski opened 9 years ago

ckosmowski commented 9 years ago

First question for this issue is:

1.) If not:

Doby grid could throw an error if initialized without columns.

2.) If yes:

There is a really weired problem connected to jQuery.ui.sortable. (Which is mentioned on many posts and issues throughout the internet).

If you have any sortable list with ui.sortable in a horizontal mode (like it applies to doby grids reorderable columns) and you initialize it with $('xy').sortable() before any elements exists in that list (which is the case if you initialize doby-grid without any columns), it seems like jQuery.sortable somehow considers the list to be vertical.

So if you try to reorder the columns you can move them left/right but nothing happens as long as you dont move your mouse up/down. If you move the mouse up/down the reordering will happen.

The current workaround for me is to add a dummy column to doby-grid when initializing it.