ywana-core8 0.0.156 → 0.0.157
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 +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +1 -1
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/TablePage.js +9 -9
package/package.json
CHANGED
package/src/domain/TablePage.js
CHANGED
@@ -92,11 +92,11 @@ export const TablePage = (props) => {
|
|
92
92
|
function renderAside() {
|
93
93
|
const rowSelected = selected && form
|
94
94
|
const rowChecked = pageContext.checked && pageContext.checked.size > 0
|
95
|
-
if (rowSelected ||
|
95
|
+
if (rowSelected || rowChecked) {
|
96
96
|
return (
|
97
97
|
<aside className="table-page">
|
98
|
-
{
|
99
|
-
{
|
98
|
+
{rowSelected ? <TableRowEditor content={new Content(schema, form)} filter={editorFilter} onChange={change} onClose={closeAside} /> : null}
|
99
|
+
{rowChecked ? <TableSelector schema={schema} actions={selectionActions} /> : null}
|
100
100
|
</aside>
|
101
101
|
)
|
102
102
|
}
|
@@ -148,20 +148,20 @@ const TableRowEditor = (props) => {
|
|
148
148
|
*/
|
149
149
|
const TableSelector = (props) => {
|
150
150
|
|
151
|
-
const {
|
151
|
+
const { schema, actions = [] } = props
|
152
152
|
const [pageContext, setPageContext] = useContext(PageContext)
|
153
|
-
const { all, checked} = pageContext
|
153
|
+
const { all, checked } = pageContext
|
154
154
|
|
155
155
|
const count = `${checked.size}/${all.length}`
|
156
156
|
const rows = all.filter(item => checked.has(item.id))
|
157
157
|
const table = {
|
158
158
|
columns: [
|
159
|
-
{ id:"idMatricula", label: "ID Matricula" }
|
159
|
+
{ id: "idMatricula", label: "ID Matricula" }
|
160
160
|
],
|
161
161
|
rows: rows || []
|
162
162
|
}
|
163
|
-
const buttons = actions.map(({label, action }) => {
|
164
|
-
return <Button label={label} raised action={() => action(
|
163
|
+
const buttons = actions.map(({ label, action }) => {
|
164
|
+
return <Button label={label} raised action={() => action(checked)} />
|
165
165
|
})
|
166
166
|
|
167
167
|
return (
|
@@ -173,7 +173,7 @@ const TableSelector = (props) => {
|
|
173
173
|
<DataTable {...table} />
|
174
174
|
</main>
|
175
175
|
<footer>
|
176
|
-
{
|
176
|
+
{buttons}
|
177
177
|
</footer>
|
178
178
|
</div>
|
179
179
|
)
|