@andersonalmeidax0/webcomponents 0.1.43 → 0.1.45

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/XInput.jsx CHANGED
@@ -117,7 +117,7 @@ class XInputExternal extends React.Component {
117
117
  <React.Fragment>
118
118
  <input id={this.props.id} style={this.style1(this.state.valid)} readOnly={this.props.readOnly}
119
119
  defaultValue={this.state.localValue} value={this.state.localValue} onChange={this.onChangeCheckInterceptor}
120
- onKeyDown ={(e)=>{if (e.keyCode === 13){console.log('Xint.onKEnter');this.props.onEnterKey();this.setState({localValue:''}); }}} />
120
+ onKeyDown ={(e)=>{if (e.keyCode === 13){console.log('Xint.onKEnter');this.props.onEnterKey();/*this.setState({localValue:''})*/; }}} />
121
121
  {(this.state.valid)?'':'(invalid)'}
122
122
  </React.Fragment>
123
123
  ); else
@@ -162,10 +162,12 @@ class JZListComponentNoRouter extends React.Component {
162
162
  var _list=null;
163
163
  if(this.props.api.findSearch)
164
164
  try {
165
+ this.setState({isLoading:true});
165
166
  _list=await this.props.api.findSearch(this.state.searchStr,this.props.apiContext);
166
167
  if(DEBUGAPICALL_UTIL)alert(JSON.stringify(_list, null, 2));
167
168
  _list=this.listModel2View(_list);
168
169
  this.setState({list:_list});
170
+ this.setState({isLoading:false});
169
171
  this.forceUpdate();
170
172
  }catch(error){
171
173
  if(error instanceof PlatAPIReturnCodeError ||
@@ -287,7 +289,7 @@ class JZListComponentNoRouter extends React.Component {
287
289
  {false&&<XButton label='Remove' icon="fa fa-trash" onClick={this.evtRemove}/>} <span> </span>
288
290
  <span>&nbsp;</span>{this.props.listConfig.filterLov&&<XSelect3 isFilter={true} list={this.props.listConfig.filterLov} width={110} onChange={this.evtRefresh} ></XSelect3>}
289
291
  <span>&nbsp;</span>{this.props.listConfig.filterSearch&&<XInputExternal readonly={false} cellStyle={true} value={this.state.searchStr} type='text' label='' onXG={(event)=>this.setState({searchStr: event.target.value})} onEnterKey={this.evtRefreshSearch} />}
290
- <span>&nbsp;</span>{this.props.listConfig.filterSearch&&<XButton label='Filter' textlabel={(this.props.textlabels)?"Search":null} icon="fa fa-search" onClick={this.evtRefreshSearch}/>} <span> </span>
292
+ <span>&nbsp;</span>{this.props.listConfig.filterSearch&&<XButton label='Filter' textlabel={(this.props.textlabels)?(this.state.isLoading?"Loading...":"Search"):null} icon={this.state.isLoading?'fa fa-spinner fa-spin':'fa fa-search'} onClick={this.evtRefreshSearch}/>} <span> </span>
291
293
  <h5 style={{color:'red'}} >{this.state.message}</h5>
292
294
 
293
295
  {<XTableRead
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andersonalmeidax0/webcomponents",
3
- "version": "0.1.43",
3
+ "version": "0.1.45",
4
4
  "description": "webcomponents",
5
5
  "main": "webcomponents",
6
6
  "scripts": {