Skip to content

Commit

Permalink
[update] extend the section of editorConfig prop of grid/treegrid col…
Browse files Browse the repository at this point in the history
…umns with type:number updates
  • Loading branch information
mafanya23 committed Oct 18, 2023
1 parent 6234281 commit 87d03a1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
14 changes: 10 additions & 4 deletions docs/grid/api/api_gridcolumn_properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ columns:[
<tr>
<td id="editorconfig"><b>editorConfig</b></td>
<td>(optional) an object with configuration settings of the column's editor.
<br><br>If <b>editorType: "combobox/multiselect"</b> is specified, the <b>editorConfig</b> object can include the following properties:
<br><br>If the <b>editorType: "combobox/multiselect"</b> is specified, the <b>editorConfig</b> object can include the following properties:
<ul>
<li><b>css</b> - (optional) styling to be applied to an option</li>
<li><b>itemHeight</b> - (optional) the height of an option</li>
Expand All @@ -214,12 +214,18 @@ columns:[
<ul>- <b>id</b> - the id of the selected option</ul>
<ul>- <b>value</b> - the value of the selected option</ul>
</li>
</ul>
<br>In case of <b>editorType: "multiselect"</b>, the <b>editorConfig</b> object can include one more property:
</ul><br>
If the <b>editorType: "multiselect"</b> is specified for a column, the <b>editorConfig</b> object can include one more property:
<ul>
<li><b>selectAllButton</b> - (optional) adds a button that allows selecting all the options in the editor</li>
</ul><br>
If <b>type: "date"</b> is specified, the <b>editorConfig</b> object can include <a href="https://docs.dhtmlx.com/suite/category/calendar-properties/">a set of properties of Calendar</a> (except for the <b>value</b>, <b>range</b>, and <b>dateFormat</b> ones)
If the <b>type: "date"</b> is specified for a column, the <b>editorConfig</b> object can include <a href="https://docs.dhtmlx.com/suite/category/calendar-properties/">a set of properties of Calendar</a> (except for the <b>value</b>, <b>range</b>, and <b>dateFormat</b> ones).<br><br>
If the <b>type:"number"</b> is specified, the <b>editorConfig</b> object can include two more properties:
<ul>
<li><b>min</b> - (optional) the minimum allowed value</li>
<li><b>max</b> - (optional) the maximum allowed value</li>
</ul>
In the <b>autoHeight:true</b> mode columns with the <b>type:"number"</b> must have the editor with the <b>"input"</b> type, unless a different editor type is specified.
<br><br><b>Related Sample: </b><a href="https://snippet.dhtmlx.com/1mxmshax" target="_blank">Grid. Rich example with templates and different editors</a>
</td>
</tr>
Expand Down
12 changes: 9 additions & 3 deletions docs/treegrid/api/api_treegridcolumn_properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ columns:[
<tr>
<td id="editorconfig"><b>editorConfig</b></td>
<td>(optional) an object with configuration settings of the column's editor.
<br><br>If <b>editorType: "combobox/multiselect"</b> is specified, the <b>editorConfig</b> object can include the following properties:
<br><br>If the <b>editorType: "combobox/multiselect"</b> is specified, the <b>editorConfig</b> object can include the following properties:
<ul>
<li><b>css</b> - (optional) styling to be applied to an option</li>
<li><b>itemHeight</b> - (optional) the height of an option</li>
Expand All @@ -215,11 +215,17 @@ columns:[
<ul>- <b>value</b> - the value of the selected option</ul>
</li>
</ul>
<br>In case of <b>editorType: "multiselect"</b>, the <b>editorConfig</b> object can include one more property:
<br>If the <b>editorType: "multiselect"</b> is specified, the <b>editorConfig</b> object can include one more property:
<ul>
<li><b>selectAllButton</b> - (optional) adds a button that allows selecting all the options in the editor</li>
</ul><br>
If <b>type: "date"</b> is specified, the <b>editorConfig</b> object can include <a href="https://docs.dhtmlx.com/suite/category/calendar-properties/">a set of properties of Calendar</a> (except for the <b>value</b>, <b>range</b>, and <b>dateFormat</b> ones)
If the <b>type: "date"</b> is specified for a column, the <b>editorConfig</b> object can include <a href="https://docs.dhtmlx.com/suite/category/calendar-properties/">a set of properties of Calendar</a> (except for the <b>value</b>, <b>range</b>, and <b>dateFormat</b> ones).<br>
If the <b>type:"number"</b> is specified, the <b>editorConfig</b> object can include two more properties:
<ul>
<li><b>min</b> - (optional) the minimum allowed value</li>
<li><b>max</b> - (optional) the maximum allowed value</li>
</ul>
In the <b>autoHeight:true</b> mode columns with the <b>type:"number"</b> must have the editor with the <b>"input"</b> type, unless a different editor type is specified.
<br><br><b>Related Sample: </b><a href="https://snippet.dhtmlx.com/0gd4dn8p" target="_blank">TreeGrid. Rich example with templates and different editors</a>
</td>
</tr>
Expand Down
1 change: 1 addition & 0 deletions docs/whatsnew.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Released on October 23, 2023
#### Grid/TreeGrid

- The functionality of the [eventHandlers](grid/api/grid_eventhandlers_config.md) configuration property is extended for the columns' header/footer
- The columns with the "number" type [allow only numeric values in the cells](grid/api/api_gridcolumn_properties.md#editorconfig)

### Fixes

Expand Down

0 comments on commit 87d03a1

Please sign in to comment.