File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -871,15 +871,6 @@ export class FeatherGrid extends Widget {
871
871
} ) ;
872
872
}
873
873
874
- _isSelectionSelected ( ) : boolean {
875
- if ( this . grid . selectionModel && ! this . grid . selectionModel . isEmpty ) {
876
- return true ;
877
- } else {
878
- return false ;
879
- }
880
- // return this.grid.selectionModel && this.grid.selectionModel.isEmpty;
881
- }
882
-
883
874
private _createCommandRegistry ( ) : CommandRegistry {
884
875
const commands = new CommandRegistry ( ) ;
885
876
commands . addCommand ( FeatherGridContextMenu . CommandID . SortAscending , {
@@ -995,7 +986,10 @@ export class FeatherGrid extends Widget {
995
986
label : 'Copy Selection to Clipboard' ,
996
987
mnemonic : - 1 ,
997
988
isEnabled : ( ) => {
998
- return this . _isSelectionSelected ( ) ;
989
+ return (
990
+ this . grid . selectionModel !== null &&
991
+ ! this . grid . selectionModel . isEmpty
992
+ ) ;
999
993
} ,
1000
994
execute : ( ) => {
1001
995
this . grid . copyToClipboard ( ) ;
@@ -1006,7 +1000,9 @@ export class FeatherGrid extends Widget {
1006
1000
label : 'Download Selection as CSV' ,
1007
1001
mnemonic : - 1 ,
1008
1002
isEnabled : ( ) => {
1009
- return this . _isSelectionSelected ( ) ;
1003
+ return (
1004
+ this . grid . selectionModel !== null && ! this . grid . selectionModel . isEmpty
1005
+ ) ;
1010
1006
} ,
1011
1007
execute : ( ) => {
1012
1008
this . downloadAsCsv ( true ) ;
You can’t perform that action at this time.
0 commit comments