diff --git a/app/assets/javascripts/app/controllers/_application_controller_table.coffee b/app/assets/javascripts/app/controllers/_application_controller_table.coffee index c3af532d5..6db5b370b 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_table.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_table.coffee @@ -168,6 +168,8 @@ class App.ControllerTable extends App.Controller @headerWidth[key] = value @availableWidth = @el.width() + if @availableWidth is 0 + @availableWidth = @minTableWidth @renderQueue() @@ -820,9 +822,6 @@ class App.ControllerTable extends App.Controller calculateHeaderWidths: -> return if !@headers - if @availableWidth is 0 - @availableWidth = @minTableWidth - availableWidth = @availableWidth widths = @getHeaderWidths() diff --git a/app/assets/javascripts/app/controllers/ticket_overview.coffee b/app/assets/javascripts/app/controllers/ticket_overview.coffee index 620362ed4..3c186591c 100644 --- a/app/assets/javascripts/app/controllers/ticket_overview.coffee +++ b/app/assets/javascripts/app/controllers/ticket_overview.coffee @@ -1139,7 +1139,7 @@ class Table extends App.Controller attribute.title = object.iconTitle() value - @table = new App.ControllerTable( + tableArguments = tableId: "ticket_overview_#{@overview.id}" overview: @overview.view.s el: @$('.table-overview') @@ -1150,7 +1150,7 @@ class Table extends App.Controller groupDirection: @overview.group_direction orderBy: @overview.order.by orderDirection: @overview.order.direction - class: 'table--light' + class: 'table--light' bindRow: events: 'click': openTicket @@ -1176,7 +1176,14 @@ class Table extends App.Controller events: 'click': callbackCheckbox select_all: callbackCheckbox - ) + + # remember elWidth even if table is not shown but rerendered + if @el.width() != 0 + @elWidth = @el.width() + if @elWidth + tableArguments.minTableWidth = @elWidth + + @table = new App.ControllerTable(tableArguments) @renderPopovers()