Skip to content

Commit

Permalink
Fix #947: Correct row expanded init
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Feb 12, 2020
1 parent fa8f185 commit 9f87733
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/assets/js/kv-grid-expand.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,7 @@ var kvExpandRow;
};
// initialize expanded cells content
$cells.each(function () {
var $cell = $(this), manager = new ToggleManager($cell), $icon = $cell.find('>.kv-expand-icon');
if (isExpanded($icon)) {
manager.collapse(false);
manager.expand(false);
}

});
if (!$grid.data(kvRowNumVar)) {
setRowNum(0);
Expand All @@ -351,8 +347,12 @@ var kvExpandRow;
return;
}
$cells.each(function () {
var expandRow = new ToggleManager($(this));
expandRow.run();
var $cell = $(this), manager = new ToggleManager($cell), $icon = $cell.find('>.kv-expand-icon');
if (isExpanded($icon)) {
manager.collapse(false);
manager.expand(false);
}
manager.run();
});
if (!$hdrCell.length) {
return;
Expand Down
2 changes: 1 addition & 1 deletion src/assets/js/kv-grid-expand.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9f87733

Please sign in to comment.