@andersonalmeidax0/webcomponents 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/RestAPIAdapter.js +1 -1
- package/jzcomponents/ErrorCard.jsx +1 -1
- package/jzcomponents/JZListComponent.jsx +2 -1
- package/package.json +1 -1
- package/releasenotes.txt +1 -0
package/README.md
CHANGED
|
@@ -36,3 +36,14 @@ class Page1 extends React.Component{
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
|
+
### Example JZListComponentNoRouter
|
|
40
|
+
Atenção: objetos devem ter propriedade "_id" para serem editaveis
|
|
41
|
+
```
|
|
42
|
+
<JZListComponentNoRouter _id={'JZ3'}
|
|
43
|
+
api={this.coinsAPI}
|
|
44
|
+
textlabels={true}
|
|
45
|
+
customEditcomponent={JZEditComponent}
|
|
46
|
+
listConfig={this.JZCoinsListConfig()}
|
|
47
|
+
editConfig={this.JZCoinsListConfig()}
|
|
48
|
+
/>
|
|
49
|
+
|
package/RestAPIAdapter.js
CHANGED
|
@@ -133,7 +133,7 @@ function getStorageWithExpiry(key) {
|
|
|
133
133
|
//if(ptoken==null)
|
|
134
134
|
// throw new PlatAPIAuthError( `An error has occured: ${response.status}`);
|
|
135
135
|
|
|
136
|
-
var {method,url,body}=this.getParams(q,vo,
|
|
136
|
+
var {method,url,body}=this.getParams(q,vo,this.tableName,filter);
|
|
137
137
|
//server is optional
|
|
138
138
|
url = this.urlServer==null?url:this.urlServer+url;
|
|
139
139
|
|
|
@@ -4,7 +4,7 @@ export class ErrorCard extends React.Component {
|
|
|
4
4
|
render() {
|
|
5
5
|
return (
|
|
6
6
|
<div className="g--10 m--2">
|
|
7
|
-
<h3>Erro de sistema inesperado. Entre em contato com
|
|
7
|
+
<h3>Erro de sistema inesperado. Entre em contato com suporte e informe a mensagem abaixo:</h3>
|
|
8
8
|
<h4>{JSON.stringify(this.props.myException)}</h4>
|
|
9
9
|
<h4>{JSON.stringify(this.props.myException.stack)}</h4>
|
|
10
10
|
<div className="card g--10 m--0">
|
|
@@ -172,7 +172,8 @@ class JZListComponentNoRouter extends React.Component {
|
|
|
172
172
|
|
|
173
173
|
/* ******** ####################### ********** */
|
|
174
174
|
evtActionEdit = async (i,item) => {
|
|
175
|
-
|
|
175
|
+
var key = item._id?item._id:item.id;
|
|
176
|
+
this.setState({showEditModal:true,editMode:'U',editKey:key});
|
|
176
177
|
if(this.props.onSelectItem) this.props.onSelectItem(item);
|
|
177
178
|
}
|
|
178
179
|
|
package/package.json
CHANGED