ywana-core8 0.0.95 → 0.0.96
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 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +1 -5
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +1 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/table.js +5 -5
package/package.json
CHANGED
package/src/html/table.js
CHANGED
@@ -80,7 +80,7 @@ export const DataTable = (props) => {
|
|
80
80
|
<tbody>
|
81
81
|
{
|
82
82
|
multiSort(rows, sortDir).map(row => (
|
83
|
-
<DataTableRow key={row.id} row={row} columns={columns} onSelect={select} onDrop={sort} editable={editable}/>
|
83
|
+
<DataTableRow key={row.id} row={row} columns={columns} onSelect={select} onDrop={sort} editable={editable} />
|
84
84
|
))
|
85
85
|
}
|
86
86
|
</tbody>
|
@@ -102,7 +102,7 @@ const DataTableRow = (props) => {
|
|
102
102
|
return (
|
103
103
|
<Fragment>
|
104
104
|
<tr onClick={ev => onSelect(row, ev)}>
|
105
|
-
{columns.map(column => <DataTableCell row={row} column={column} cell={row[column.id]} editable={editable}/>)}
|
105
|
+
{columns.map(column => <DataTableCell row={row} column={column} cell={row[column.id]} editable={editable} />)}
|
106
106
|
{row.info ? <Icon icon={infoIcon} clickable action={() => toggleInfo(!isInfoOpen)} /> : null}
|
107
107
|
</tr>
|
108
108
|
{row.info && isInfoOpen ? (
|
@@ -121,7 +121,7 @@ const DataTableCell = ({ row, column, cell, editable }) => {
|
|
121
121
|
|
122
122
|
const render = (type) => {
|
123
123
|
const { id, disabled = false, min, max, onChange, options } = column
|
124
|
-
if (id
|
124
|
+
if (id === "checked") {
|
125
125
|
<CheckBox id={id} value={cell} onChange={(id, value) => onChange(row.id, id, value)} />
|
126
126
|
} else if (editable && onChange) {
|
127
127
|
switch (type) {
|
@@ -155,7 +155,7 @@ const DataTableCell = ({ row, column, cell, editable }) => {
|
|
155
155
|
* Boolean Cell Viewer
|
156
156
|
*/
|
157
157
|
const BooleanCellViewer = ({ id, value = false }) => {
|
158
|
-
const icon = value === true ?
|
158
|
+
const icon = value === true ? "check_box" : "check_box_outline_blank"
|
159
159
|
return <Icon icon={icon} />
|
160
160
|
}
|
161
161
|
|
@@ -163,7 +163,7 @@ const BooleanCellViewer = ({ id, value = false }) => {
|
|
163
163
|
* String Cell Viewer
|
164
164
|
*/
|
165
165
|
const StringCellViewer = ({ id, value, options }) => {
|
166
|
-
const option = options ? options.find(
|
166
|
+
const option = options ? options.find(o => o.value === value) : null
|
167
167
|
const text = option ? option.label : value
|
168
168
|
return (<div className="field-editor string-editor">{text}</div>)
|
169
169
|
}
|