-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(resizer): only bind autoresize when enabled #489
fix(resizer): only bind autoresize when enabled #489
Conversation
@@ -251,7 +252,7 @@ export class ResizerService { | |||
|
|||
/** | |||
* Provide the possibility to pause the resizer for some time, until user decides to re-enabled it later if he wish to. | |||
* @param {boolean} isResizePaused are we pausing the resizer? | |||
* @param {boolean} isResizePaused are we pausing the resizer?@C |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is that @C
a typo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. No idea how that got there...but I'll fix it.
Codecov Report
@@ Coverage Diff @@
## master #489 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 220 220
Lines 13580 13581 +1
Branches 4473 4667 +194
==========================================
+ Hits 13580 13581 +1
Continue to review full report at Codecov.
|
@@ -117,7 +118,7 @@ export class ResizerService { | |||
this._fixedWidth = fixedGridSizes.width; | |||
} | |||
|
|||
if (this.gridOptions) { | |||
if (this.gridOptions && this.gridOptions.enableAutoResize) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but isn't this make the grid to not resize even with static sizes?
Have you tried running the code in this lib project?
We need to make sure that even if enableAutoResize
is disabled, this won't break grids with static sizes like the Example 1 in this webpack demo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked out the branch on my side and it seems to work as expected so I guess we're good
tested in Aurelia-Slickgrid and all Cypress tests are passing, so I'll merge |
This fixes the bug/exception mentioned here ghiscoding/Angular-Slickgrid#836 and is "PR 1".
Writing this comment I realize that just the
clearTimeout
would have been enough to fix the exception, but sincebindAutoResizeDataGrid
has this commentBind an auto resize trigger on the datagrid, if that is enable then it will resize itself to the available space
I think the added check onthis.gridOptions.enableAutoResize
should be done ininit
and is good. Also when not using auto resizeresizeGrid
is called frombindResizeHook
in Vanilla, Angular and Aurelia, so this change shouldn't cause noticeable side effects.