ywana-core8 0.0.588 → 0.0.591
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/dist/index.cjs +7 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +7 -5
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +7 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/TablePage.js +5 -2
- package/src/html/accordion.js +1 -2
- package/src/html/accordion.test.js +2 -9
package/package.json
CHANGED
package/src/domain/TablePage.js
CHANGED
@@ -32,7 +32,7 @@ export const TablePage = (props) => {
|
|
32
32
|
|
33
33
|
const [pageContext, setPageContext] = useContext(PageContext)
|
34
34
|
const context = TableContext(url, field, host, urlQuery, params)
|
35
|
-
const { selected } = pageContext
|
35
|
+
const { all, selected } = pageContext
|
36
36
|
const timer = useRef(null)
|
37
37
|
const [form, setForm] = useState(selected)
|
38
38
|
|
@@ -132,9 +132,12 @@ export const TablePage = (props) => {
|
|
132
132
|
})
|
133
133
|
}
|
134
134
|
|
135
|
+
const total = all ? all.length : 0
|
136
|
+
const title2 = `[${total}] ${title}`
|
137
|
+
|
135
138
|
return (
|
136
139
|
<Fragment>
|
137
|
-
<Header className="table-page" title={<Text>{
|
140
|
+
<Header className="table-page" title={<Text>{title2}</Text>}>
|
138
141
|
{canAdd ? <Button icon="add" label="Añadir" action={add} raised /> : null}
|
139
142
|
|
140
143
|
<Button icon="refresh" label="Reload" action={reload} />
|
package/src/html/accordion.js
CHANGED
@@ -7,7 +7,7 @@ import './accordion.css'
|
|
7
7
|
*/
|
8
8
|
export const Accordion = (props) => {
|
9
9
|
|
10
|
-
const { className, sections = [], onCheck
|
10
|
+
const { className, sections = [], onCheck } = props
|
11
11
|
const [openSections, setOpenSections] = useState([])
|
12
12
|
const [checkedSections, setCheckedSections] = useState([])
|
13
13
|
|
@@ -37,7 +37,6 @@ export const Accordion = (props) => {
|
|
37
37
|
return (
|
38
38
|
<AccordionSection key={index} {...section} open={isOpen} checked={isChecked} onToggle={() => toggle(index)} onCheck={() => check(index)}>
|
39
39
|
{section.children}
|
40
|
-
{children}
|
41
40
|
</AccordionSection>
|
42
41
|
)
|
43
42
|
})}
|
@@ -28,17 +28,10 @@ const AccordionTest = (prop) => {
|
|
28
28
|
{ id: 17, checked: false, icon: 'star', title: 'Section 17', subtitle: 'Subtitle 17', info, toolbar, open: false, children: <div>Section 17 content</div> },
|
29
29
|
]
|
30
30
|
|
31
|
+
|
31
32
|
return (
|
32
33
|
<>
|
33
|
-
<Accordion sections={sections} onCheck={console.log}
|
34
|
-
{(section) => {
|
35
|
-
return (
|
36
|
-
<div>
|
37
|
-
{section.children}
|
38
|
-
</div>
|
39
|
-
)
|
40
|
-
}}
|
41
|
-
</Accordion>
|
34
|
+
<Accordion sections={sections} onCheck={console.log} />
|
42
35
|
</>
|
43
36
|
)
|
44
37
|
}
|