File tree 2 files changed +8
-8
lines changed
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ __ColumnDef Options__:
44
44
- `enableCellEdit` (default: `false` for columns of type `'object'`, `true` for all other columns) - `true` will enable
45
45
editing and `false` will disable it.
46
46
- `cellEditableCondition` (default: `true`) Can be set to a boolean or a function that will be called with the cellScope
47
- to determine if the cell should be invoked in edit mode.
47
+ and triggerEvent to determine if the cell should be invoked in edit mode.
48
48
- `type` (default: `'string'`) If set to `'number'`, `'boolean'` or `'date'` the default editor provided for editing will be numeric
49
49
or boolean or date editor respectively. If set to `'object'` the column will not be editable by default. Be aware that this
50
50
`type` column is also used for other purposes within ui-grid, including the sorting logic.
Original file line number Diff line number Diff line change 147
147
* If false, then editing of cell is not allowed.
148
148
* @example
149
149
* <pre>
150
- * function($scope){
151
- * //use $scope.row.entity and $scope.col.colDef to determine if editing is allowed
150
+ * function($scope, triggerEvent ){
151
+ * //use $scope.row.entity, $scope.col.colDef and triggerEvent to determine if editing is allowed
152
152
* return true;
153
153
* }
154
154
* </pre>
209
209
* @description If specified, either a value or function evaluated before editing cell. If falsy, then editing of cell is not allowed.
210
210
* @example
211
211
* <pre>
212
- * function($scope){
213
- * //use $scope.row.entity and $scope.col.colDef to determine if editing is allowed
212
+ * function($scope, triggerEvent ){
213
+ * //use $scope.row.entity, $scope.col.colDef and triggerEvent to determine if editing is allowed
214
214
* return true;
215
215
* }
216
216
* </pre>
592
592
}
593
593
}
594
594
595
- function shouldEdit ( col , row ) {
595
+ function shouldEdit ( col , row , triggerEvent ) {
596
596
return ! row . isSaving &&
597
597
( angular . isFunction ( col . colDef . cellEditableCondition ) ?
598
- col . colDef . cellEditableCondition ( $scope ) :
598
+ col . colDef . cellEditableCondition ( $scope , triggerEvent ) :
599
599
col . colDef . cellEditableCondition ) ;
600
600
}
601
601
732
732
return ;
733
733
}
734
734
735
- if ( ! shouldEdit ( $scope . col , $scope . row ) ) {
735
+ if ( ! shouldEdit ( $scope . col , $scope . row , triggerEvent ) ) {
736
736
return ;
737
737
}
738
738
You can’t perform that action at this time.
0 commit comments