Skip to content

Commit 48accd3

Browse files
authored
Merge pull request #1933 from adumesny/master
column() doc fixes
2 parents b4f8966 + 60e8ec8 commit 48accd3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ gridstack.js API
3535
- [`cellHeight(val: number, update = true)`](#cellheightval-number-update--true)
3636
- [`cellWidth()`](#cellwidth)
3737
- [`commit()`](#commit)
38-
- [`column(column: number | 'auto', layout: ColumnOptions = 'moveScale')`](#columncolumn-number--auto-layout-columnoptions--movescale)
38+
- [`column(column: number, layout: ColumnOptions = 'moveScale')`](#columncolumn-number-layout-columnoptions--movescale)
3939
- [`destroy([removeDOM])`](#destroyremovedom)
4040
- [`disable()`](#disable)
4141
- [`enable()`](#enable)
@@ -87,7 +87,7 @@ gridstack.js API
8787
- `cellHeightThrottle`?: number - throttle time delay (in ms) used when cellHeight='auto' to improve performance vs usability (default?: 100).
8888
* A value of 0 will make it instant at a cost of re-creating the CSS file at ever window resize event!
8989
- `children`?: GridStackWidget[] - list of children item to create when calling load() or addGrid()
90-
- `column` - number of columns (default: `12`) which can change on the fly with `column(N)` as well. See [example](http://gridstackjs.com/demo/column.html)
90+
- `column` - Integer > 0 (default 12) which can change on the fly with `column(N)` API, or `'auto'` for nested grids to size themselves to the parent grid container (to make sub-items are the same size). See [column](http://gridstackjs.com/demo/column.html) and [nested](http://gridstackjs.com/demo/nested.html)
9191
- `class`?: string - additional class on top of '.grid-stack' (which is required for our CSS) to differentiate this instance
9292
- `disableDrag` - disallows dragging of widgets (default: `false`).
9393
- `disableOneColumnMode` - disables the onColumnMode when the grid width is less than minW (default: 'false')
@@ -372,14 +372,14 @@ Gets current cell width (grid width / # of columns).
372372

373373
Ends batch updates. Updates DOM nodes. You must call it after `batchUpdate()`.
374374

375-
### `column(column: number | 'auto', layout: ColumnOptions = 'moveScale')`
375+
### `column(column: number, layout: ColumnOptions = 'moveScale')`
376376

377377
set the number of columns in the grid. Will update existing widgets to conform to new number of columns,
378378
as well as cache the original layout so you can revert back to previous positions without loss.
379379
Requires `gridstack-extra.css` (or minimized version) for [2-11],
380380
else you will need to generate correct CSS (see https://github.com/gridstack/gridstack.js#change-grid-columns)
381381

382-
- `column` - Integer > 0 (default 12), or 'auto' for nested grids to size themselves to the parent grid container (to make su-items the same size inside and outside)
382+
- `column` - Integer > 0 (default 12)
383383
- `layout` - specify the type of re-layout that will happen (position, size, etc...).
384384
Note: items will never be outside of the current column boundaries. default ('moveScale'). Ignored for 1 column.
385385
Possible values: 'moveScale' | 'move' | 'scale' | 'none' | (column: number, oldColumn: number, nodes: GridStackNode[], oldNodes: GridStackNode[]) => void.

0 commit comments

Comments
 (0)