Fixed issue #1829 - The column widths of a table are shifted after manual change and use of pagination.

This commit is contained in:
Martin Edenhofer 2018-02-13 15:52:11 +01:00
parent 2432b852b2
commit bc0777274f

View file

@ -851,13 +851,21 @@ class App.ControllerTable extends App.Controller
# update store and runtime @headerWidth
@preferencesStore('headerWidth', leftColumnKey, leftWidth)
@headerWidth[leftColumnKey] = leftWidth
_.find(@headers, (column) -> column.name is leftColumnKey).displayWidth = leftWidth
# set header at runtime
for header in @headers
if header.name is leftColumnKey
header.displayWidth = @resizeTargetLeft.outerWidth()
# update store and runtime @headerWidth
if rightColumnKey
@preferencesStore('headerWidth', rightColumnKey, rightWidth)
@headerWidth[rightColumnKey] = rightWidth
_.find(@headers, (column) -> column.name is rightColumnKey).displayWidth = rightWidth
# set header at runtime
for header in @headers
if header.name is rightColumnKey
header.displayWidth = @resizeTargetRight.outerWidth()
sortByColumn: (event) =>
column = $(event.currentTarget).closest('[data-column-key]').attr('data-column-key')