@fto-consult/expo-ui 2.18.1 → 2.18.2
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
|
@@ -993,23 +993,19 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
993
993
|
sectionListColumns[columnName] = {};
|
|
994
994
|
}
|
|
995
995
|
const {sectionListColumns:pSListColumns} = this.prepareColumns({sectionListColumns});
|
|
996
|
-
this.
|
|
997
|
-
this.
|
|
998
|
-
this.
|
|
999
|
-
this.setIsLoading(false);
|
|
1000
|
-
});
|
|
996
|
+
this.prepareData({data:this.INITIAL_STATE.data,sectionListColumns:pSListColumns},(state)=>{
|
|
997
|
+
this.setState({...state,sectionListColumns:pSListColumns},()=>{
|
|
998
|
+
this.setIsLoading(false);
|
|
1001
999
|
});
|
|
1002
|
-
})
|
|
1000
|
+
});
|
|
1003
1001
|
}
|
|
1004
1002
|
removeAllColumnsInSectionList(){
|
|
1005
1003
|
const {sectionListColumns} = this.prepareColumns({sectionListColumns:{}});
|
|
1006
|
-
this.
|
|
1007
|
-
this.
|
|
1008
|
-
this.
|
|
1009
|
-
this.setIsLoading(false);
|
|
1010
|
-
});
|
|
1004
|
+
this.prepareData({data:this.INITIAL_STATE.data,sectionListColumns},(state)=>{
|
|
1005
|
+
this.setState({...state,sectionListColumns},()=>{
|
|
1006
|
+
this.setIsLoading(false);
|
|
1011
1007
|
});
|
|
1012
|
-
})
|
|
1008
|
+
});
|
|
1013
1009
|
}
|
|
1014
1010
|
/*** permet d'effectuer le rendu des colonnes groupable dans le menu item */
|
|
1015
1011
|
renderSectionListMenu(){
|
|
@@ -1885,8 +1881,11 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
1885
1881
|
canAutoSort(){
|
|
1886
1882
|
return this.isSortable() && this.props.autoSort !==false ? true : false;
|
|
1887
1883
|
}
|
|
1884
|
+
isSelectable(){
|
|
1885
|
+
return this.props.selectable !== false ? true : false;
|
|
1886
|
+
}
|
|
1888
1887
|
isSelectableMultiple(){
|
|
1889
|
-
return defaultBool(this.props.selectableMultiple,true)
|
|
1888
|
+
return this.isSelectable() && defaultBool(this.props.selectableMultiple,true)
|
|
1890
1889
|
}
|
|
1891
1890
|
getSort(){
|
|
1892
1891
|
return defaultObj(this.sortRef.current);
|
|
@@ -112,7 +112,8 @@ const DatagridFactory = (Factory)=>{
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
render(){
|
|
115
|
-
let {title,testID,actions,
|
|
115
|
+
let {title,testID,actions,
|
|
116
|
+
selectableMultiple,
|
|
116
117
|
sortable,
|
|
117
118
|
autoSort,
|
|
118
119
|
exportable,
|
|
@@ -144,7 +145,7 @@ const DatagridFactory = (Factory)=>{
|
|
|
144
145
|
exportable = defaultBool(exportable,true);
|
|
145
146
|
let isMobile = isMobileOrTabletMedia();
|
|
146
147
|
selectable = defaultVal(selectable,true);
|
|
147
|
-
selectableMultiple =
|
|
148
|
+
selectableMultiple = this.isSelectableMultiple();
|
|
148
149
|
pagin = defaultVal(pagin,true)
|
|
149
150
|
showPagination = defaultVal(showPagination,true);
|
|
150
151
|
|
|
@@ -167,10 +168,9 @@ const DatagridFactory = (Factory)=>{
|
|
|
167
168
|
let _progressBar = this.getProgressBar();
|
|
168
169
|
const pointerEvents = isLoading? "none":"auto";
|
|
169
170
|
|
|
170
|
-
let selectAllRowsToggleTitle = isAllRowsSelected?"Tout Déselec":"Tout Select"
|
|
171
171
|
let restItems = [];
|
|
172
172
|
let max = this.getMaxSelectableRows();
|
|
173
|
-
if(selectableMultiple && max
|
|
173
|
+
if(selectableMultiple && max){
|
|
174
174
|
max = max.formatNumber();
|
|
175
175
|
restItems = [
|
|
176
176
|
...this.renderCustomMenu(),
|