ywana-core8 0.0.213 → 0.0.214

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.213",
3
+ "version": "0.0.214",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
package/src/html/table.js CHANGED
@@ -74,9 +74,9 @@ export const DataTable = (props) => {
74
74
  <table>
75
75
  <thead>
76
76
  <tr>
77
- {columns.map(({ id, label, type, sortable }) => {
77
+ {columns.map(({ id, label, type, item, sortable }) => {
78
78
  const sort = sortDir[id] ? sortDir[id] : null
79
- const [rowspan, colspan] = type === TYPES.ENTITY ? [1, 3] : [2, 1]
79
+ const [rowspan, colspan] = type === TYPES.ENTITY ? [1, Object.keys(item).length] : [2, 1]
80
80
  return (
81
81
  <th rowSpan={rowspan} colSpan={colspan}>
82
82
  {id === "checked" ? <CheckBox onChange={checkAll} /> : <Text key={`th_${id}`}>{label}</Text>}
@@ -94,7 +94,7 @@ export const DataTable = (props) => {
94
94
  const { item } = column
95
95
  const fields = item ? Object.values(item) : []
96
96
  return fields
97
- .filter(field => !field.column)
97
+ .filter(field => field.column === true)
98
98
  .map(field => <th>{field.label}</th>)
99
99
  })
100
100
  }