Skip to content

Commit 27ae648

Browse files
committed
Merge pull request #2051 from xavadu/master
Misspelled option name in the documentation
2 parents 55abeab + c5ded6b commit 27ae648

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

misc/tutorial/201_editable.ngdoc

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,45 @@
22
@name Tutorial: 201 Edit Feature
33
@description
44

5-
The ui.grid.edit feature allows inline editing of grid data. To enable, you must include the `'ui.grid.edit'` module
5+
The ui.grid.edit feature allows inline editing of grid data. To enable, you must include the `'ui.grid.edit'` module
66
and you must include the `ui-grid-edit` directive on your grid element.
77

88
You can use the `enableCellEdit` options in your column definitions to allow a column to be editable.
99

1010
Editing is invoked via double-click, f2, or start typing any non-navigable key. Cell editing ends on tab, enter or esc (cancel)
1111
on an input editor, and tab, left or right arrows, enter or esc for a dropdown.
1212

13-
By default an input element is provided, with numeric, date and checkbox editors for fields specified as `'number'`, `'date'`
13+
By default an input element is provided, with numeric, date and checkbox editors for fields specified as `'number'`, `'date'`
1414
and `'boolean'` types, for all other fields a simple text editor is provided.
1515

16-
A dropdown editor is also available, through setting the `editableCellTemplate` on the `columnDef` to `'ui-grid/dropdownEditor'`.
16+
A dropdown editor is also available, through setting the `editableCellTemplate` on the `columnDef` to `'ui-grid/dropdownEditor'`.
1717
When using a dropdown editor you need to provide an options array through the `editDropDownOptionsArray` property on the `columnDef`.
18-
This array by default should be an array of `{id: xxx, value: xxx}`, although the field tags can be changed through
19-
using the `editDropdownIdLabel` and `editDropdownNameLabel` options.
18+
This array by default should be an array of `{id: xxx, value: xxx}`, although the field tags can be changed through
19+
using the `editDropdownIdLabel` and `editDropdownValueLabel` options.
2020

2121
Custom edit templates should be used for any editor other than the default editors, but be aware that you will likely also
2222
need to provide a custom directive similar to the uiGridEditor directive so as to provide `BEGIN_CELL_EDIT, CANCEL_CELL_EDIT
2323
and END_CELL_EDIT` events.
2424

2525
__ColumnDef Options__:
2626

27-
- `editableCellTemplate` (default: `'ui-grid/cellEditor'`) - Valid html, templateCache Id, or url that returns html
27+
- `editableCellTemplate` (default: `'ui-grid/cellEditor'`) - Valid html, templateCache Id, or url that returns html
2828
content to be compiled when edit mode is invoked.
29-
- `enableCellEdit` (default: `false` for columns of type `'object'`, `true` for all other columns) - `true` will enable
29+
- `enableCellEdit` (default: `false` for columns of type `'object'`, `true` for all other columns) - `true` will enable
3030
editing and `false` will disable it.
31-
- `cellEditableCondition` (default: `true`) Can be set to a boolean or a function that will be called with the cellScope
31+
- `cellEditableCondition` (default: `true`) Can be set to a boolean or a function that will be called with the cellScope
3232
to determine if the cell should be invoked in edit mode.
33-
- `type` (default: `'string'`) If set to `'number'`, `'boolean'` or `'date'` the default editor provided for editing will be numeric
34-
or boolean or date editor respectively. If set to `'object'` the column will not be editable by default. Be aware that this
33+
- `type` (default: `'string'`) If set to `'number'`, `'boolean'` or `'date'` the default editor provided for editing will be numeric
34+
or boolean or date editor respectively. If set to `'object'` the column will not be editable by default. Be aware that this
3535
`type` column is also used for other purposes within ui-grid, including the sorting logic.
3636
- `editDropdownOptionsArray` If a dropdown, needs to be populated with an array of values, by default those values should be
3737
`{id: xxx, value: xxx}`, the labels can be adjusted with the next two options
3838
- `editDropdownIdLabel` (default: `'id'`) Controls the id label in the options array - so if your array happens to contain
3939
`'code'` instead you can use it without having to reprocess the array
40-
- `editDropdownValueLabel` (default: `'value'`) Controls the value label in the options array - if your array happens to
40+
- `editDropdownValueLabel` (default: `'value'`) Controls the value label in the options array - if your array happens to
4141
contain `'name'` instead you can use it without having to reprocess the array
4242
- `editDropdownFilter` (default: `''`) Allows you to apply a filter to the values in the edit dropdown options, for example
43-
if you were using angular-translate you would set this to `'translate'`
43+
if you were using angular-translate you would set this to `'translate'`
4444

4545
The following option is available only if using cellNav feature
4646

@@ -76,11 +76,11 @@ $scope.gridOptions.columnDefs = [
7676
{ name: 'id', enableCellEdit: false, width: '10%' },
7777
{ name: 'name', displayName: 'Name (editable)', width: '20%' },
7878
{ name: 'age', displayName: 'Age' , type: 'number', width: '10%' },
79-
{ name: 'gender', displayName: 'Gender', editableCellTemplate: 'ui-grid/dropdownEditor', width: '20%',
79+
{ name: 'gender', displayName: 'Gender', editableCellTemplate: 'ui-grid/dropdownEditor', width: '20%',
8080
cellFilter: 'mapGender', editDropdownValueLabel: 'gender', editDropdownOptionsArray: [
81-
{ id: 1, gender: 'male' },
82-
{ id: 2, gender: 'female' }
83-
] },
81+
{ id: 1, gender: 'male' },
82+
{ id: 2, gender: 'female' }
83+
] },
8484
{ name: 'registered', displayName: 'Registered' , type: 'date', cellFilter: 'date:"yyyy-MM-dd"', width: '20%' },
8585
{ name: 'address', displayName: 'Address', type: 'object', cellFilter: 'address', width: '30%' },
8686
{ name: 'address.city', displayName: 'Address (even rows editable)', width: '20%',
@@ -119,7 +119,7 @@ $scope.gridOptions.columnDefs = [
119119
1: 'male',
120120
2: 'female'
121121
};
122-
122+
123123
return function(input) {
124124
if (!input){
125125
return '';

0 commit comments

Comments
 (0)