ywana-core8 0.0.131 → 0.0.135

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.131",
3
+ "version": "0.0.135",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -19,7 +19,7 @@ export const TablePage = (props) => {
19
19
  const { id = "table",
20
20
  icon, title, name,
21
21
  schema, url, field,
22
- actions, dev = false, tableActions,
22
+ actions, dev = false, tableActions, selectionActions = [],
23
23
  editable, canFilter = false, canQuery = false, canAdd = true, canDelete = true,
24
24
  autosave = true, delay = 1000,
25
25
  groupBy, validator, scenario,
@@ -96,7 +96,7 @@ export const TablePage = (props) => {
96
96
  return (
97
97
  <aside className="table-page">
98
98
  { rowSelected ? <TableRowEditor content={new Content(schema, form)} filter={editorFilter} onChange={change} onClose={closeAside} /> : null }
99
- { rowChecked ? <TableSelector schema={schema} onClose={closeAside} /> : null }
99
+ { rowChecked ? <TableSelector schema={schema} actions={selectionActions} /> : null }
100
100
  </aside>
101
101
  )
102
102
  }
@@ -153,13 +153,15 @@ const TableSelector = (props) => {
153
153
  const { all, checked} = pageContext
154
154
 
155
155
  const count = `${checked.size}/${all.length}`
156
- const rows = [...checked].map(id => all.find(item => item.id === id))
156
+
157
+ const rows = all.filter(item => checked.has(item.id))
157
158
  console.log(count, rows)
159
+
158
160
  const table = {
159
161
  columns: [
160
162
  { id:"idMatricula", label: "ID Matricula" }
161
163
  ],
162
- rows: []
164
+ rows: rows || []
163
165
  }
164
166
 
165
167
  return (
@@ -169,8 +171,6 @@ const TableSelector = (props) => {
169
171
  </Header>
170
172
  <main>
171
173
  <DataTable {...table} />
172
- <DataTable {...table} onRowSelection={select} editable={editable} onCheckAll={check} />
173
-
174
174
  </main>
175
175
  <footer>
176
176
  { actions }