ywana-core8 0.0.511 → 0.0.512
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 +3 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +3 -6
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +3 -6
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/table.js +3 -3
package/package.json
CHANGED
package/src/html/table.js
CHANGED
@@ -180,7 +180,7 @@ const DataTableCell = ({ row, column, cell, editable }) => {
|
|
180
180
|
}
|
181
181
|
}
|
182
182
|
|
183
|
-
return column.type === TYPES.ENTITY ? <EntityCellViewer id={column.id} item={column.item} value={cell}
|
183
|
+
return column.type === TYPES.ENTITY ? <EntityCellViewer id={column.id} item={column.item} value={cell} /> : (
|
184
184
|
<td key={column.id} className={column.id}>{render(column.type)}</td>
|
185
185
|
)
|
186
186
|
}
|
@@ -190,14 +190,14 @@ const DataTableCell = ({ row, column, cell, editable }) => {
|
|
190
190
|
* @param {*} param0
|
191
191
|
* @returns
|
192
192
|
*/
|
193
|
-
const EntityCellViewer = ({ id, item, value
|
193
|
+
const EntityCellViewer = ({ id, item, value }) => {
|
194
194
|
const fields = Object.values(item).filter(field => field.column === true)
|
195
195
|
|
196
196
|
return fields.map(field => {
|
197
197
|
|
198
198
|
let text = value[field.id]
|
199
199
|
|
200
|
-
if (format) {
|
200
|
+
if (field.format) {
|
201
201
|
switch (format) {
|
202
202
|
case FORMATS.COLOR:
|
203
203
|
text = <input type="color" value={text} disabled />
|