@fto-consult/expo-ui 2.39.5 → 2.39.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/package.json
CHANGED
|
@@ -2367,6 +2367,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
2367
2367
|
this.beforePrepareColumns();
|
|
2368
2368
|
args = defaultObj(args);
|
|
2369
2369
|
const sectionListColumns = {};
|
|
2370
|
+
const nSectionList = {};
|
|
2370
2371
|
const sListColumns = isObj(args.sectionListColumns) ? args.sectionListColumns : this.getSectionListColumns();
|
|
2371
2372
|
const filteredColumns = isObjOrArray(args.filteredColumns)?args.filteredColumns : isObjOrArray(this.state.filteredColumns) ? this.state.filteredColumns : {};
|
|
2372
2373
|
const columns = args.columns || this.state.columns;
|
|
@@ -2541,7 +2542,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
2541
2542
|
if(this.props.groupable !== false && header.groupable !== false && !this.isSelectableColumn(header,header.field) && !this.isIndexColumn(header,header.field)){
|
|
2542
2543
|
const isInSectionListHeader = isObj(sListColumns[field]);
|
|
2543
2544
|
if(isInSectionListHeader){
|
|
2544
|
-
|
|
2545
|
+
nSectionList[field] = {
|
|
2545
2546
|
...header,
|
|
2546
2547
|
width,
|
|
2547
2548
|
type,
|
|
@@ -2565,7 +2566,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
2565
2566
|
mItem.right = (p)=>{
|
|
2566
2567
|
return <Icon name="material-settings" {...p} onPress={(e)=>{
|
|
2567
2568
|
//React.stopEventPropagation(e);
|
|
2568
|
-
this.configureSectionListColumn({...mItem,...defaultObj(
|
|
2569
|
+
this.configureSectionListColumn({...mItem,...defaultObj(nSectionList[field])});
|
|
2569
2570
|
//return false;
|
|
2570
2571
|
}}/>
|
|
2571
2572
|
}
|
|
@@ -2576,6 +2577,11 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
2576
2577
|
visibleColumnIndex++;
|
|
2577
2578
|
|
|
2578
2579
|
})
|
|
2580
|
+
Object.map(sListColumns,(f,i)=>{
|
|
2581
|
+
if(i in nSectionList){
|
|
2582
|
+
sectionListColumns[i] = nSectionList[i];
|
|
2583
|
+
}
|
|
2584
|
+
})
|
|
2579
2585
|
this.preparedColumns.sortedColumns = sortedColumns;
|
|
2580
2586
|
this.preparedColumns.sortedColumn = sortedColumn;
|
|
2581
2587
|
this.preparedColumns.sortedColumnsLength = sortedColumnsLength;
|
|
@@ -3376,7 +3382,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
3376
3382
|
if((stableHash(nextProps.data) === stableHash(this.props.data))) {
|
|
3377
3383
|
return false;
|
|
3378
3384
|
}
|
|
3379
|
-
this.setIsLoading(true
|
|
3385
|
+
this.setIsLoading(true);
|
|
3380
3386
|
this.prepareData({...nextProps,force:true},(state)=>{
|
|
3381
3387
|
this.setState(state)
|
|
3382
3388
|
});
|
|
@@ -3387,7 +3393,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
3387
3393
|
isLoading (){
|
|
3388
3394
|
if(this.state.isReady === false || this.isRenderingRef.current) return true;
|
|
3389
3395
|
if(typeof this.props.isLoading =='boolean') return this.props.isLoading;
|
|
3390
|
-
return this.isLoadingRef.current
|
|
3396
|
+
return !!this.isLoadingRef.current;
|
|
3391
3397
|
}
|
|
3392
3398
|
getLinesProgressBar(){
|
|
3393
3399
|
return CommonDatagridComponent.LinesProgressBar(this.props);
|