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
|
@ -195,8 +195,8 @@ class App.ControllerTable extends App.Controller
|
||||||
el.filter('.js-pager').html('')
|
el.filter('.js-pager').html('')
|
||||||
return
|
return
|
||||||
pager = App.view('generic/table_pager')(
|
pager = App.view('generic/table_pager')(
|
||||||
page: @shownPage
|
page: @shownPage
|
||||||
pages: pages
|
pages: pages
|
||||||
)
|
)
|
||||||
if find
|
if find
|
||||||
el.find('.js-pager').html(pager)
|
el.find('.js-pager').html(pager)
|
||||||
|
@ -851,13 +851,21 @@ class App.ControllerTable extends App.Controller
|
||||||
# update store and runtime @headerWidth
|
# update store and runtime @headerWidth
|
||||||
@preferencesStore('headerWidth', leftColumnKey, leftWidth)
|
@preferencesStore('headerWidth', leftColumnKey, leftWidth)
|
||||||
@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
|
# update store and runtime @headerWidth
|
||||||
if rightColumnKey
|
if rightColumnKey
|
||||||
@preferencesStore('headerWidth', rightColumnKey, rightWidth)
|
@preferencesStore('headerWidth', rightColumnKey, rightWidth)
|
||||||
@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) =>
|
sortByColumn: (event) =>
|
||||||
column = $(event.currentTarget).closest('[data-column-key]').attr('data-column-key')
|
column = $(event.currentTarget).closest('[data-column-key]').attr('data-column-key')
|
||||||
|
|
Loading…
Reference in a new issue