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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.95",
3
+ "version": "0.0.96",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
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="checked") {
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 ? "check_box" : "check_box_outline_blank"
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( o => o.value === value) : null
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
  }