Skip to content

Commit

Permalink
1.1.2 - ability to change enter key behaviour to move down
Browse files Browse the repository at this point in the history
  • Loading branch information
OvidijusParsiunas committed Jan 8, 2024
1 parent 66e7623 commit 8550b73
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 31 deletions.
4 changes: 2 additions & 2 deletions component/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion component/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "active-table",
"version": "1.1.1",
"version": "1.1.2",
"description": "Framework agnostic table component for editable data experience",
"main": "./dist/activeTable.js",
"module": "./dist/activeTable.js",
Expand Down
18 changes: 9 additions & 9 deletions other-packages/react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions other-packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "active-table-react",
"version": "1.1.1",
"version": "1.1.2",
"description": "Active Table wrapper for React",
"main": "./dist/activeTable.js",
"module": "./dist/activeTable.js",
Expand Down Expand Up @@ -33,7 +33,7 @@
"license": "MIT",
"dependencies": {
"@lit-labs/react": "^1.1.1",
"active-table": "1.1.1"
"active-table": "1.1.2"
},
"devDependencies": {
"@types/react": "^18.0.28",
Expand Down
2 changes: 1 addition & 1 deletion website/docs/docs/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ npm install active-table-react
Access the component via CDN:

```
https://unpkg.com/[email protected].1/dist/activeTable.bundle.js
https://unpkg.com/[email protected].2/dist/activeTable.bundle.js
```
61 changes: 61 additions & 0 deletions website/docs/docs/table.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,67 @@ row's `backgroundColor` and text `color`.

<LineBreak></LineBreak>

### `enterKeyMoveDown` {#enterKeyMoveDown}

- Type: `boolean`
- Default: _false_

When the user presses the ENTER key, the cursor focus is moved to the cell below.

#### Example

<TableContainer>
<ActiveTable
enterKeyMoveDown={true}
data={[
['Planet', 'Diameter', 'Mass', 'Moons', 'Density'],
['Earth', 12756, 5.97, 1, 5514],
['Mars', 6792, 0.642, 2, 3934],
['Jupiter', 142984, 1898, 79, 1326],
['Saturn', 120536, 568, 82, 687],
['Neptune', 49528, 102, 14, 1638],
]}
tableStyle={{width: '100%', boxShadow: 'rgb(172 172 172 / 17%) 0px 0.5px 1px 0px', borderRadius: '2px'}}
></ActiveTable>
</TableContainer>

<Tabs>
<TabItem value="js" label="Sample code">

```html
<active-table enterKeyMoveDown="true"></active-table>
```

</TabItem>
<TabItem value="py" label="Full code">

```html
<!-- This example is for Vanilla JS and should be tailored to your framework (see Examples) -->

<active-table
enterKeyMoveDown="true"
data='[
["Planet", "Diameter", "Mass", "Moons", "Density"],
["Earth", 12756, 5.97, 1, 5514],
["Mars", 6792, 0.642, 2, 3934],
["Jupiter", 142984, 1898, 79, 1326],
["Saturn", 120536, 568, 82, 687],
["Neptune", 49528, 102, 14, 1638]]'
tableStyle='{"borderRadius":"2px"}'
></active-table>
```

</TabItem>
</Tabs>

<LineBreak></LineBreak>

:::caution
The autofocus does not work in the Safari browser.
:::

<LineBreak></LineBreak>

### `auxiliaryStyle` {#auxiliaryStyle}

- Type: `string`
Expand Down
30 changes: 15 additions & 15 deletions website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@docusaurus/preset-classic": "^2.3.0",
"@docusaurus/theme-search-algolia": "^2.3.1",
"@mdx-js/react": "^1.6.22",
"active-table-react": "^1.1.1",
"active-table-react": "^1.1.2",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
Expand Down

0 comments on commit 8550b73

Please sign in to comment.