Fixed issue #1829 - The column widths of a table are shifted after manual change and use of pagination.
This commit is contained in:
parent
2432b852b2
commit
bc0777274f
1 changed files with 12 additions and 4 deletions
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue