Skip to content

Commit 8550b73

Browse files
1.1.2 - ability to change enter key behaviour to move down
1 parent 66e7623 commit 8550b73

8 files changed

Lines changed: 92 additions & 31 deletions

File tree

component/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

component/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "active-table",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "Framework agnostic table component for editable data experience",
55
"main": "./dist/activeTable.js",
66
"module": "./dist/activeTable.js",

other-packages/react/package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

other-packages/react/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "active-table-react",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "Active Table wrapper for React",
55
"main": "./dist/activeTable.js",
66
"module": "./dist/activeTable.js",
@@ -33,7 +33,7 @@
3333
"license": "MIT",
3434
"dependencies": {
3535
"@lit-labs/react": "^1.1.1",
36-
"active-table": "1.1.1"
36+
"active-table": "1.1.2"
3737
},
3838
"devDependencies": {
3939
"@types/react": "^18.0.28",

website/docs/docs/installation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ npm install active-table-react
1919
Access the component via CDN:
2020

2121
```
22-
https://unpkg.com/active-table@1.1.1/dist/activeTable.bundle.js
22+
https://unpkg.com/active-table@1.1.2/dist/activeTable.bundle.js
2323
```

website/docs/docs/table.mdx

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,67 @@ row's `backgroundColor` and text `color`.
235235

236236
<LineBreak></LineBreak>
237237

238+
### `enterKeyMoveDown` {#enterKeyMoveDown}
239+
240+
- Type: `boolean`
241+
- Default: _false_
242+
243+
When the user presses the ENTER key, the cursor focus is moved to the cell below.
244+
245+
#### Example
246+
247+
<TableContainer>
248+
<ActiveTable
249+
enterKeyMoveDown={true}
250+
data={[
251+
['Planet', 'Diameter', 'Mass', 'Moons', 'Density'],
252+
['Earth', 12756, 5.97, 1, 5514],
253+
['Mars', 6792, 0.642, 2, 3934],
254+
['Jupiter', 142984, 1898, 79, 1326],
255+
['Saturn', 120536, 568, 82, 687],
256+
['Neptune', 49528, 102, 14, 1638],
257+
]}
258+
tableStyle={{width: '100%', boxShadow: 'rgb(172 172 172 / 17%) 0px 0.5px 1px 0px', borderRadius: '2px'}}
259+
></ActiveTable>
260+
</TableContainer>
261+
262+
<Tabs>
263+
<TabItem value="js" label="Sample code">
264+
265+
```html
266+
<active-table enterKeyMoveDown="true"></active-table>
267+
```
268+
269+
</TabItem>
270+
<TabItem value="py" label="Full code">
271+
272+
```html
273+
<!-- This example is for Vanilla JS and should be tailored to your framework (see Examples) -->
274+
275+
<active-table
276+
enterKeyMoveDown="true"
277+
data='[
278+
["Planet", "Diameter", "Mass", "Moons", "Density"],
279+
["Earth", 12756, 5.97, 1, 5514],
280+
["Mars", 6792, 0.642, 2, 3934],
281+
["Jupiter", 142984, 1898, 79, 1326],
282+
["Saturn", 120536, 568, 82, 687],
283+
["Neptune", 49528, 102, 14, 1638]]'
284+
tableStyle='{"borderRadius":"2px"}'
285+
></active-table>
286+
```
287+
288+
</TabItem>
289+
</Tabs>
290+
291+
<LineBreak></LineBreak>
292+
293+
:::caution
294+
The autofocus does not work in the Safari browser.
295+
:::
296+
297+
<LineBreak></LineBreak>
298+
238299
### `auxiliaryStyle` {#auxiliaryStyle}
239300

240301
- Type: `string`

website/package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"@docusaurus/preset-classic": "^2.3.0",
1919
"@docusaurus/theme-search-algolia": "^2.3.1",
2020
"@mdx-js/react": "^1.6.22",
21-
"active-table-react": "^1.1.1",
21+
"active-table-react": "^1.1.2",
2222
"clsx": "^1.2.1",
2323
"prism-react-renderer": "^1.3.5",
2424
"react": "^17.0.2",

0 commit comments

Comments
 (0)