imbric-theme 0.8.4 → 0.8.5
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.
|
@@ -8,7 +8,7 @@ import DynamicSelect from '../../molecules/DynamicSelect'
|
|
|
8
8
|
import Icon from "../../atoms/Icon/Icon";
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
export const FooterTable = ({ getStyles, range, setPage, setDataPage, setScrollPage, page, slice, placeholderDinamicSelect, handleResultsForPage, defaultValueSelect, positionPag }) => {
|
|
11
|
+
export const FooterTable = ({ getStyles, range, setPage, setDataPage, setScrollPage, page, slice, placeholderDinamicSelect, handleResultsForPage, defaultValueSelect, positionPag, useContador, useAvancesCeil, setPositionPag, setContador }) => {
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
// const [positionPag, setPositionPag] = useState(0)
|
|
@@ -17,7 +17,11 @@ export const FooterTable = ({ getStyles, range, setPage, setDataPage, setScrollP
|
|
|
17
17
|
if (slice.length < 1 && page !== 1) {
|
|
18
18
|
setPage(page - 1);
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
console.log(useContador)
|
|
22
|
+
console.log(useAvancesCeil * 1)
|
|
23
|
+
|
|
24
|
+
}, [slice, page, setPage, positionPag, useContador, useAvancesCeil]);
|
|
21
25
|
|
|
22
26
|
// const nextPagScroll = (page) => {
|
|
23
27
|
|
|
@@ -38,13 +42,34 @@ export const FooterTable = ({ getStyles, range, setPage, setDataPage, setScrollP
|
|
|
38
42
|
<div className={styles.tableFooter}>
|
|
39
43
|
|
|
40
44
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
{positionPag !== 0 ?
|
|
46
|
+
|
|
47
|
+
<>
|
|
48
|
+
|
|
49
|
+
<Icon
|
|
50
|
+
name="angleLeft"
|
|
51
|
+
onClick={() => { setScrollPage('angleLeft') }}
|
|
52
|
+
/>
|
|
53
|
+
|
|
54
|
+
<button
|
|
55
|
+
className={`${styles.button} ${styles.inactiveButton}`}
|
|
56
|
+
onClick={() => { setPage(1); setDataPage(1); setPositionPag(0); setContador(1) }}
|
|
57
|
+
>
|
|
58
|
+
1
|
|
59
|
+
</button>
|
|
60
|
+
|
|
61
|
+
<button
|
|
62
|
+
disabled
|
|
63
|
+
className={`${styles.button} ${styles.disabled}`}
|
|
64
|
+
>
|
|
65
|
+
...
|
|
66
|
+
</button>
|
|
67
|
+
</> : null}
|
|
45
68
|
|
|
46
69
|
<div className={getStyles('footer-table-pag-box')}>
|
|
70
|
+
|
|
47
71
|
<div id="table-pag-scroll" className={getStyles('footer-table-pag')} style={{ marginLeft: positionPag + 'px' }}>
|
|
72
|
+
|
|
48
73
|
{range.map((el, index) => (
|
|
49
74
|
|
|
50
75
|
<button
|
|
@@ -58,14 +83,37 @@ export const FooterTable = ({ getStyles, range, setPage, setDataPage, setScrollP
|
|
|
58
83
|
</button>
|
|
59
84
|
|
|
60
85
|
))}
|
|
86
|
+
|
|
61
87
|
</div>
|
|
62
88
|
</div>
|
|
63
89
|
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
90
|
+
{useContador < useAvancesCeil && useContador !== useAvancesCeil || useContador === 1 ?
|
|
91
|
+
|
|
92
|
+
<>
|
|
93
|
+
|
|
94
|
+
<button
|
|
95
|
+
disabled
|
|
96
|
+
className={`${styles.button} ${styles.disabled}`}
|
|
97
|
+
>
|
|
98
|
+
...
|
|
99
|
+
</button>
|
|
100
|
+
|
|
101
|
+
<button
|
|
102
|
+
onClick={() => { setPage(range.length); setDataPage(range.length); setPositionPag('-' + (190 * (useAvancesCeil - 1))); setContador(useAvancesCeil * 1) }}
|
|
103
|
+
className={`${styles.button} ${styles.inactiveButton}`}
|
|
104
|
+
>
|
|
105
|
+
{range.length}
|
|
106
|
+
</button>
|
|
107
|
+
|
|
108
|
+
< Icon
|
|
109
|
+
name="angleRight"
|
|
110
|
+
onClick={() => { setScrollPage('angleRight') }}
|
|
111
|
+
// onChange={item => { handleSelectRange(item); onChangeRange(item); }}
|
|
112
|
+
/>
|
|
113
|
+
|
|
114
|
+
</> : null}
|
|
115
|
+
|
|
116
|
+
|
|
69
117
|
|
|
70
118
|
|
|
71
119
|
</div>
|
|
@@ -94,7 +142,7 @@ FooterTable.propTypes = {
|
|
|
94
142
|
setScrollPage: PropTypes.func,
|
|
95
143
|
placeholderDinamicSelect: PropTypes.string,
|
|
96
144
|
handleResultsForPage: PropTypes.func,
|
|
97
|
-
defaultValueSelect: PropTypes.any
|
|
145
|
+
defaultValueSelect: PropTypes.any,
|
|
98
146
|
// type: PropTypes.oneOf(options.types),
|
|
99
147
|
}
|
|
100
148
|
|
|
@@ -104,7 +152,7 @@ FooterTable.defaultProps = {
|
|
|
104
152
|
setScrollPage: () => { },
|
|
105
153
|
handleResultsForPage: () => { },
|
|
106
154
|
placeholderDinamicSelect: 'resultados por pagina',
|
|
107
|
-
defaultValueSelect: { value: 10, label: '10' }
|
|
155
|
+
defaultValueSelect: { value: 10, label: '10' },
|
|
108
156
|
}
|
|
109
157
|
|
|
110
158
|
export default withStyles(styles)(FooterTable)
|
|
@@ -39,6 +39,17 @@
|
|
|
39
39
|
background: #f9f9f9;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
.inactiveButton:hover {
|
|
43
|
+
color: white;
|
|
44
|
+
background: rgb(73, 125, 189, .4);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.disabled {
|
|
48
|
+
color: #2c3e50;
|
|
49
|
+
background: #f9f9f9;
|
|
50
|
+
cursor: no-drop;
|
|
51
|
+
}
|
|
52
|
+
|
|
42
53
|
.footer-table-pag-box {
|
|
43
54
|
display: flex;
|
|
44
55
|
overflow-x: clip;
|