@fto-consult/expo-ui 6.55.1 → 6.55.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
@@ -88,8 +88,7 @@ const formatValue = ({value,format,abreviate,aggregatorFunction})=>{
|
|
88
88
|
}
|
89
89
|
return abreviate? value.abreviate():value.formatNumber();
|
90
90
|
}
|
91
|
-
export default function DGGridFooterValue (props){
|
92
|
-
let {label,text,displayLabel,withLabel,abreviate,style,aggregatorFunctions,aggregatorFunction,format,testID,anchorProps} = props;
|
91
|
+
export default function DGGridFooterValue ({label,text,displayLabel,isFooterCell,withLabel,abreviate,style,aggregatorFunctions,aggregatorFunction,format,testID,anchorProps,...props}){
|
93
92
|
aggregatorFunctions = defaultObj(aggregatorFunctions);
|
94
93
|
anchorProps = defaultObj(anchorProps);
|
95
94
|
testID = defaultStr(testID,"RN_DatagridFooterComponent");
|
@@ -50,7 +50,7 @@ const DatagridFactory = (Factory)=>{
|
|
50
50
|
}
|
51
51
|
renderFooterCell(props){
|
52
52
|
const {columnField,style} = props;
|
53
|
-
|
53
|
+
const footersValues = this.getFooterValues();
|
54
54
|
const footerFields = this.getFootersFields();
|
55
55
|
if(isObj(footerFields[columnField])){
|
56
56
|
return <Footer
|
@@ -59,7 +59,8 @@ const DatagridFactory = (Factory)=>{
|
|
59
59
|
displayLabel = {false}
|
60
60
|
style = {[style]}
|
61
61
|
aggregatorFunction = {this.getActiveAggregatorFunction().code}
|
62
|
-
aggregatorFunctions = {this.aggregatorFunctions}
|
62
|
+
aggregatorFunctions = {this.aggregatorFunctions}
|
63
|
+
isFooterCell
|
63
64
|
/>
|
64
65
|
}
|
65
66
|
return null;
|
@@ -7,10 +7,10 @@ import Label from "$ecomponents/Label";
|
|
7
7
|
import theme from "$theme";
|
8
8
|
|
9
9
|
export default function HeaderCellWrapper({columnField,isFilter,isFooter}){
|
10
|
-
const {render,sortedColumn,filtersValues,...props} = useGetColumnProps({columnField,isFilter,isFooter});
|
10
|
+
const {render,sortedColumn,filtersValues,data,...props} = useGetColumnProps({columnField,isFilter,isFooter});
|
11
11
|
const columnDef = props.columnDef;
|
12
12
|
const isHeader = !isFilter && !isFooter;
|
13
|
-
const rProps = isHeader ? sortedColumn : undefined;
|
13
|
+
const rProps = isHeader ? sortedColumn : isFooter ? data : undefined;
|
14
14
|
const width = props.width;
|
15
15
|
const {containerProps} = props;
|
16
16
|
return React.useMemo(()=>{
|
@@ -7,15 +7,14 @@ import {classNames} from "$cutils";
|
|
7
7
|
|
8
8
|
const TableHeadersWrapperComponent = React.forwardRef(({className},ref)=>{
|
9
9
|
const {testID,tableHeadId} = useTable();
|
10
|
-
const
|
11
|
-
<Header isHeader={true} testID={testID+"_TableHeader"}/>
|
12
|
-
<Header isFilter={true} testID={testID+"_TableFilters"} style={[styles.header,styles.filters,theme.styles.pt0,theme.styles.pb0,theme.styles.ml0,theme.styles.mr0]}/>
|
13
|
-
<Header isFooter testID={testID+"_TableFooter"} style={[styles.header,styles.footers,theme.styles.pt0,theme.styles.pb0,theme.styles.ml0,theme.styles.mr0]}/>
|
14
|
-
</>,[])
|
10
|
+
const filters = React.useMemo(()=><Header isFilter={true} testID={testID+"_TableFilters"} style={[styles.header,styles.filters,theme.styles.pt0,theme.styles.pb0,theme.styles.ml0,theme.styles.mr0]}/>,[])
|
15
11
|
return <thead ref={ref} id={tableHeadId} className={classNames(className,"virtuoso-list-render-table-thead")}
|
16
|
-
style = {{zIndex:100, position: 'sticky', top: 0 ,width:"100%"}}
|
17
|
-
|
18
|
-
|
12
|
+
style = {{zIndex:100, position: 'sticky', top: 0 ,width:"100%"}}>
|
13
|
+
<>
|
14
|
+
<Header isHeader={true} testID={testID+"_TableHeader"}/>
|
15
|
+
{filters}
|
16
|
+
<Header isFooter testID={testID+"_TableFooter"} style={[styles.header,styles.footers,theme.styles.pt0,theme.styles.pb0,theme.styles.ml0,theme.styles.mr0]}/>
|
17
|
+
</>
|
19
18
|
</thead>
|
20
19
|
});
|
21
20
|
|
@@ -45,7 +45,7 @@ export const usePrepareColumns = ({columns,testID,columnsWidths,headerCellContai
|
|
45
45
|
import useTable from "./useTable";
|
46
46
|
|
47
47
|
export const useGetColumnProps = ({columnField,isFilter,isFooter})=>{
|
48
|
-
const {renderFilterCell,renderFooterCell,filtersValues,renderHeaderCell,sortedColumn,columns,filterCellContainerProps,footerCellContainerProps,headerCellContainerProps,testID,colsWidths} = useTable();
|
48
|
+
const {renderFilterCell,renderFooterCell,filtersValues,renderHeaderCell,data,sortedColumn,columns,filterCellContainerProps,footerCellContainerProps,headerCellContainerProps,testID,colsWidths} = useTable();
|
49
49
|
const columnDef = columns[columnField];
|
50
50
|
const props = isFilter ? {
|
51
51
|
containerProps : defaultObj(filterCellContainerProps),
|
@@ -57,6 +57,7 @@ export const useGetColumnProps = ({columnField,isFilter,isFooter})=>{
|
|
57
57
|
containerProps : defaultObj(headerCellContainerProps),
|
58
58
|
render : renderHeaderCell
|
59
59
|
}
|
60
|
+
props.data = data;
|
60
61
|
props.width = colsWidths[columnField];
|
61
62
|
props.columnField = columnField;
|
62
63
|
props.columnDef = columnDef;
|