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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.588",
3
+ "version": "0.0.589",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
@@ -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
  &nbsp;
140
140
  <Button icon="refresh" label="Reload" action={reload} />
@@ -7,7 +7,7 @@ import './accordion.css'
7
7
  */
8
8
  export const Accordion = (props) => {
9
9
 
10
- const { className, sections = [], onCheck, children } = props
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
  }