File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
projects/igniteui-angular/src/lib/action-strip/grid-actions Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 11import { Component , HostBinding } from '@angular/core' ;
22import { IgxGridActionsBaseDirective } from './grid-actions-base.directive' ;
3+ import { showMessage } from '../../core/deprecateDecorators' ;
34
45@Component ( {
56 selector : 'igx-grid-editing-actions' ,
@@ -16,6 +17,8 @@ export class IgxGridEditingActionsComponent extends IgxGridActionsBaseDirective
1617 @HostBinding ( 'class.igx-action-strip__editing-actions' )
1718 public cssClass = 'igx-action-strip__editing-actions' ;
1819
20+ private isMessageShown = false ;
21+
1922 /**
2023 * Enter row or cell edit mode depending the grid rowEditable option
2124 * @example
@@ -33,6 +36,12 @@ export class IgxGridEditingActionsComponent extends IgxGridActionsBaseDirective
3336 const row = this . strip . context ;
3437 const firstEditable = row . cells . filter ( cell => cell . editable ) [ 0 ] ;
3538 const grid = row . grid ;
39+ if ( ! grid . hasEditableColumns ) {
40+ this . isMessageShown = showMessage (
41+ 'The grid should be editable in order to use IgxGridEditingActionsComponent' ,
42+ this . isMessageShown ) ;
43+ return ;
44+ }
3645 // be sure row is in view
3746 if ( grid . rowList . filter ( r => r === row ) . length !== 0 ) {
3847 grid . crudService . begin ( firstEditable ) ;
You can’t perform that action at this time.
0 commit comments