Skip to content

Commit 7dbd7a4

Browse files
author
Domino987
committed
2 parents 88bb78f + d817419 commit 7dbd7a4

File tree

7 files changed

+54
-5
lines changed

7 files changed

+54
-5
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1+
#
12
# Should run on each push, this should include pull requests
3+
#
4+
# If the commit message starts with "skip:build" we will skip this action
5+
#
6+
# If the commit message starts with "Release " we skip build
7+
#
8+
29
name: Build
310

411
on:
@@ -10,7 +17,9 @@ on:
1017

1118
jobs:
1219
build:
13-
if:
20+
if: |
21+
(startsWith(github.event.head_commit.message, 'skip:build') != true) &&
22+
(startsWith(github.event.head_commit.message, 'Release ') != true)
1423
runs-on: ubuntu-latest
1524
strategy:
1625
matrix:

.slugignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
esbuild.cocnfig.js
2+
jest.config.js

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
#### 3.0.10 (2021-06-26)
2+
3+
##### Other Changes
4+
5+
- build update readme ([1fb439b6](https://github.com/material-table-core/core/commit/1fb439b698e887bfaa39099e4ab8299fa470d163))
6+
7+
#### 3.0.9 (2021-06-26)
8+
9+
##### Other Changes
10+
11+
- build update readme ([dfc74a89](https://github.com/material-table-core/core/commit/dfc74a8994701b91459df3ac6e42ba72c8a633b2))
12+
- build ([8b5925fc](https://github.com/material-table-core/core/commit/8b5925fc60b90e1edf7afba147e4e11c55a40a37))
13+
14+
#### 3.0.8 (2021-06-26)
15+
116
#### 3.0.7 (2021-06-19)
217

318
##### Bug Fixes

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,13 @@
5858
💾 [Installation](https://material-table-core.com/docs/#installation) 🎉 [Usage](https://material-table-core.com/docs/#basic-usage)
5959
[Why does this repo exist?](https://material-table-core.com/docs/about) 🚧 [Documentation](https://material-table-core.com/docs) ⚙️ [Demos](https://material-table-core.com/demos)
6060
</div>
61+
62+
# Contributing
63+
64+
Thanks for taking interest in contributing! :rocket: In being a community based repository, we wouldn't be here without you!
65+
66+
**Urgent items include**:
67+
68+
- Get rid of [`data-manager.js`](https://github.com/material-table-core/core/blob/master/src/utils/data-manager.js) (which is a homegrown global state manager of sorts) and integrate [React context](https://github.com/material-table-core/core/tree/context/src/store) via the `context` branch
69+
- Documentation over at [`material-table-core/website`](https://github.com/material-table-core/website)
70+
- Implementing tests via Jest

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "3.0.7",
6+
"version": "3.0.10",
77
"description": "Datatable for React based on https://material-ui.com/api/table/ with additional features",
88
"main": "dist/index.js",
99
"types": "types/index.d.ts",

src/components/m-table-edit-cell.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ class MTableEditCell extends React.Component {
99
super(props);
1010

1111
this.state = {
12+
errorState: {
13+
isValid: true,
14+
helperText: ''
15+
},
1216
isLoading: false,
1317
value: this.props.rowData[this.props.columnDef.field]
1418
};
@@ -104,7 +108,7 @@ class MTableEditCell extends React.Component {
104108
icon: this.props.icons.Check,
105109
tooltip: this.props.localization.saveTooltip,
106110
onClick: this.onApprove,
107-
disabled: this.state.isLoading || !isValid
111+
disabled: !this.state.isLoading || !isValid
108112
},
109113
{
110114
icon: this.props.icons.Clear,
@@ -123,6 +127,13 @@ class MTableEditCell extends React.Component {
123127
);
124128
}
125129

130+
handleChange(value) {
131+
const errorState = this.props.columnDef.validate({
132+
[this.props.columnDef.field]: value
133+
});
134+
this.setState({ errorState, value });
135+
}
136+
126137
render() {
127138
const error = validateInput(this.props.columnDef, this.state.value);
128139
console.log(error);
@@ -135,7 +146,9 @@ class MTableEditCell extends React.Component {
135146
error={!error.isValid}
136147
helperText={error.helperText}
137148
value={this.state.value}
138-
onChange={(value) => this.setState({ value })}
149+
error={!this.state.errorState.isValid}
150+
helperText={this.state.errorState.helperText}
151+
onChange={(value) => this.handleChange(value)}
139152
onKeyDown={this.handleKeyDown}
140153
disabled={this.state.isLoading}
141154
rowData={this.props.rowData}

0 commit comments

Comments
 (0)