@fto-consult/expo-ui 8.61.10 → 8.62.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "8.61.10",
3
+ "version": "8.62.0",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "react-native-paper-doc": "https://github.com/callstack/react-native-paper/tree/main/docs/docs/guides",
6
6
  "scripts": {
@@ -374,7 +374,7 @@ const DatagridFactory = (Factory)=>{
374
374
  const showFooters = this.canShowFooters();
375
375
  let restItems = [];
376
376
  let max = this.getMaxSelectableRows();
377
- if(max && this.isSelectableMultiple()){
377
+ if(max && this.isSelectableMultiple() && this.canRenderActions()){
378
378
  max = max.formatNumber();
379
379
  restItems = [
380
380
  {
@@ -3565,6 +3565,16 @@ export default class CommonDatagridComponent extends AppComponent {
3565
3565
  opts.onSuccess = cb = typeof cb =="function"? cb : typeof opts.onSuccess =='function'? opts.onSuccess : undefined;
3566
3566
  opts.force = defaultBool(force,opts.force,true)
3567
3567
  return new Promise((resolve,reject)=>{
3568
+ if(typeof this.props.onRefreshDatagrid =="function"){
3569
+ const r = this.props.onRefreshDatagrid({context:this});
3570
+ if(r === false){
3571
+ return resolve([]);
3572
+ }
3573
+ if(isPromise(r)){
3574
+ return r.then(resolve).catch(reject);
3575
+ }
3576
+ return resolve(r);
3577
+ }
3568
3578
  return this.fetchData(opts).then((data)=>{
3569
3579
  if(isFunction(cb)){
3570
3580
  cb(data,{...opts,context:this});
@@ -3572,11 +3582,7 @@ export default class CommonDatagridComponent extends AppComponent {
3572
3582
  if(typeof this.props.onRefresh ==='function'){
3573
3583
  this.props.onRefresh({...opts,context:this});
3574
3584
  }
3575
- }).then(resolve).catch(reject).finally(()=>{
3576
- if(typeof this.props.onRefreshDatagrid =="function"){
3577
- this.props.onRefreshDatagrid({context:this});
3578
- }
3579
- });
3585
+ }).then(resolve).catch(reject);
3580
3586
  })
3581
3587
  }
3582
3588
  componentDidMount(){
@@ -165,7 +165,7 @@ const DatagridFactory = (Factory)=>{
165
165
  let max = this.getMaxSelectableRows();
166
166
  if(selectableMultiple && max){
167
167
  max = max.formatNumber();
168
- if(selectableMultiple && !canRenderChart){
168
+ if(selectableMultiple && !canRenderChart && this.canRenderActions()){
169
169
  restItems.push({
170
170
  label : "Sélectionner "+max.formatNumber(),
171
171
  icon : "select-all",