Skip to content

resizableColumns not working with non-visible table #1066

@spo0okie

Description

@spo0okie

Prerequisites

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • The issue still exists against the latest master branch of yii2-grid.
  • This is not an usage question. I confirm having gone through and read the documentation and demos.
  • This is not a general programming / coding question. (Those should be directed to the webtips Q & A forum).
  • I have attempted to find the simplest possible steps to reproduce the issue.
  • I have included a failing test as a pull request (Optional).

Steps to reproduce the issue

  1. Create page with gridview with resizableColumns on inactive tab of tabControl
  2. switch to tab with gridview
  3. columns not resizable

Expected behavior and actual behavior

columns must resize as it always do but they stay still

Environment

Browsers

  • Google Chrome
  • Mozilla Firefox
  • Internet Explorer
  • Safari

Operating System

  • Windows
  • Mac OS X
  • Linux
  • Mobile

Libraries

  • jQuery version: 3.6.4
  • yii2-grid version: 3.5.x-dev

Isolating the problem

  • This bug happens on the demos page
  • The bug happens consistently across all tested browsers
  • This bug happens when using yii2-grid without other plugins.

Additional

Problem is in resizable plugin itself. It needs table to be visible to calculate columns widths and init correctly. Need to defer initialization until table become visible

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions