-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
9,631 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { gw_getGrid } from "../utilities"; | ||
|
||
/* | ||
* This file is part of the grid project | ||
* (c) Basis Europe <eu@basis.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
export function gw_onReadyEvent(id, e) { | ||
|
||
// registe state debounced monitor | ||
const stateDebouce = gw_debounce(changeEvent => { | ||
|
||
// We skip the first render state changes | ||
if (!gw_getGrid(id).hasOwnProperty('isFirstRender')) { | ||
gw_getGrid(id).isFirstRender = true; | ||
return; | ||
} | ||
|
||
gw_onStateChanged(id, changeEvent); | ||
}, 500); | ||
|
||
[ | ||
'sortChanged', | ||
'filterChanged', | ||
'columnVisible', | ||
'columnPinned', | ||
'columnResized', | ||
'columnMoved', | ||
'newColumnsLoaded', | ||
'gridColumnsChanged', | ||
'displayedColumnsChanged', | ||
'virtualColumnsChanged', | ||
'columnEverythingChanged', | ||
'gridSizeChanged', | ||
'expandOrCollapseAll', | ||
'toolPanelVisibleChanged' | ||
].forEach(event => { | ||
gw_getGrid(id).options.api.addEventListener(event, stateDebouce); | ||
}); | ||
} | ||
|
||
export function gw_onStateChanged(id, e) { | ||
gw_sendEvent(id, { | ||
'type': 'gw.stateChanged', | ||
'detail': [] | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters