imbric-theme 0.7.4 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,7 @@ import withStyles from '../../hocs/withStyles'
|
|
7
7
|
import DynamicSelect from '../../molecules/DynamicSelect'
|
8
8
|
|
9
9
|
|
10
|
-
export const FooterTable = ({ getStyles, range, setPage, setDataPage, page, slice, placeholderDinamicSelect, handleResultsForPage }) => {
|
10
|
+
export const FooterTable = ({ getStyles, range, setPage, setDataPage, page, slice, placeholderDinamicSelect, handleResultsForPage, defaultValueSelect }) => {
|
11
11
|
useEffect(() => {
|
12
12
|
if (slice.length < 1 && page !== 1) {
|
13
13
|
setPage(page - 1);
|
@@ -22,32 +22,32 @@ export const FooterTable = ({ getStyles, range, setPage, setDataPage, page, slic
|
|
22
22
|
{range.map((el, index) => (
|
23
23
|
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
25
|
+
<button
|
26
|
+
key={'footer' + index}
|
27
|
+
className={`${styles.button} ${page === el ? styles.activeButton : styles.inactiveButton
|
28
|
+
}`}
|
29
|
+
onClick={() => { setPage(el); setDataPage(el) }}
|
30
30
|
|
31
|
-
|
31
|
+
onChange={item => { handleSelectRange(item); onChangeRange(item); }}
|
32
|
+
|
33
|
+
>
|
34
|
+
{el}
|
35
|
+
</button>
|
32
36
|
|
33
|
-
>
|
34
|
-
{el}
|
35
|
-
</button>
|
36
37
|
|
37
38
|
|
38
|
-
|
39
39
|
|
40
40
|
))}
|
41
41
|
</div>
|
42
42
|
|
43
43
|
<DynamicSelect
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
44
|
+
isInline
|
45
|
+
onChange={handleResultsForPage}
|
46
|
+
optionsSelect={options.opResultsForPage}
|
47
|
+
placeholder={placeholderDinamicSelect}
|
48
|
+
isClearable={false}
|
49
|
+
defaultValue={defaultValueSelect}
|
50
|
+
/>
|
51
51
|
|
52
52
|
</div>
|
53
53
|
|
@@ -60,7 +60,8 @@ FooterTable.propTypes = {
|
|
60
60
|
getStyles: PropTypes.func.isRequired,
|
61
61
|
setDataPage: PropTypes.func,
|
62
62
|
placeholderDinamicSelect: PropTypes.string,
|
63
|
-
handleResultsForPage: PropTypes.func
|
63
|
+
handleResultsForPage: PropTypes.func,
|
64
|
+
defaultValueSelect: PropTypes.any
|
64
65
|
// type: PropTypes.oneOf(options.types),
|
65
66
|
}
|
66
67
|
|
@@ -68,7 +69,8 @@ FooterTable.defaultProps = {
|
|
68
69
|
getStyles: () => { },
|
69
70
|
setDataPage: () => { },
|
70
71
|
handleResultsForPage: () => { },
|
71
|
-
placeholderDinamicSelect: 'resultados por pagina'
|
72
|
+
placeholderDinamicSelect: 'resultados por pagina',
|
73
|
+
defaultValueSelect: { value: 10, label: '10' }
|
72
74
|
}
|
73
75
|
|
74
76
|
export default withStyles(styles)(FooterTable)
|