ywana-core8 0.0.588 → 0.0.589
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
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
|
|
@@ -134,7 +134,7 @@ export const TablePage = (props) => {
|
|
134
134
|
|
135
135
|
return (
|
136
136
|
<Fragment>
|
137
|
-
<Header className="table-page" title={<Text>{title}</Text>}>
|
137
|
+
<Header className="table-page" title={<Text>({all ? all.length || 0 }) {title}</Text>}>
|
138
138
|
{canAdd ? <Button icon="add" label="Añadir" action={add} raised /> : null}
|
139
139
|
|
140
140
|
<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
|
}
|