Skip to content

Commit

Permalink
feat: add api method to clear range selections
Browse files Browse the repository at this point in the history
see #167
resolves #167
  • Loading branch information
hyyan committed Jul 17, 2019
1 parent 1c64302 commit 31cab40
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 7 deletions.
16 changes: 12 additions & 4 deletions BBjGridExWidget.bbj
Expand Up @@ -3046,7 +3046,7 @@ class public BBjGridExWidget extends BBjWidget implements BBjGridExWidgetColumns
rem * Add new range selection
rem *
rem * <br><b><small>#API</small></b>
rem *
rem *
rem * @param BBjGridExWidgetClienAddRangeSelectionModel model! the add selection model
rem *
rem * @return BBjGridExWidgetClienAddRangeSelectionModel
Expand All @@ -3059,7 +3059,7 @@ class public BBjGridExWidget extends BBjWidget implements BBjGridExWidgetColumns
rem * Add new range selection
rem *
rem * <br><b><small>#API</small></b>
rem *
rem *
rem * @param BBjString columns! columns as comma seperated string (ex: CDNUMBER , COST)
rem * @param BBjString start! start row id or index
rem * @param BBjString end! end row id or index
Expand All @@ -3077,7 +3077,7 @@ class public BBjGridExWidget extends BBjWidget implements BBjGridExWidgetColumns
rem * Add new range selection
rem *
rem * <br><b><small>#API</small></b>
rem *
rem *
rem * @param BBjString columns! columns as comma seperated string (ex: CDNUMBER , COST)
rem * @param BBjNumber start! start row id or index
rem * @param BBjNumber end! end row id or index
Expand All @@ -3091,7 +3091,7 @@ class public BBjGridExWidget extends BBjWidget implements BBjGridExWidgetColumns
rem * Add new range selection
rem *
rem * <br><b><small>#API</small></b>
rem *
rem *
rem * @param BBjString columns! columns as comma seperated string (ex: CDNUMBER , COST)
rem *
rem * @return BBjGridExWidgetClienAddRangeSelectionModel
Expand All @@ -3100,6 +3100,14 @@ class public BBjGridExWidget extends BBjWidget implements BBjGridExWidgetColumns
methodret #addRangeSelection(columns!,null() , null())
methodend
rem /**
rem * Clears the selected range.
rem *
rem * <br><b><small>#API</small></b>
rem */
method public void clearRangeSelection()
#executeScript("gw_clearRangeSelection('" + #GRIDID$ + "')")
methodend
rem /**
rem * Show loading overlay
rem *
rem * <br><b><small>#API</small></b>
Expand Down
13 changes: 12 additions & 1 deletion client/dist/bbj-grid-widget.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/dist/bbj-grid-widget.min.js

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

2 changes: 1 addition & 1 deletion client/dist/report.html

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions client/src/api/rows.js
Expand Up @@ -283,4 +283,16 @@ export function gw_addCellRange(id, range) {
rowEndIndex: Math.abs(end),
columns: pr.columns
});
}

/**
* Clears the selected range.
*
* @param {Number} id grid's id
*/
export function gw_clearRangeSelection(id) {
gw_getGrid(id)
.options
.api
.clearRangeSelection();
}

0 comments on commit 31cab40

Please sign in to comment.