ywana-core8 0.1.9 → 0.1.10

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.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
package/src/html/table.js CHANGED
@@ -4,8 +4,9 @@ import { DropDown, TextField } from './textfield'
4
4
  import { CheckBox } from './checkbox'
5
5
  import { Icon } from './icon'
6
6
  import { Text } from './text'
7
- import './table.css'
7
+ import { EmptyMessage } from '../widgets'
8
8
  import { Uploader } from '../widgets/upload/Uploader'
9
+ import './table.css'
9
10
 
10
11
  const isFunction = value => value && (Object.prototype.toString.call(value) === "[object Function]" || "function" === typeof value || value instanceof Function);
11
12
 
@@ -14,7 +15,7 @@ const isFunction = value => value && (Object.prototype.toString.call(value) ===
14
15
  */
15
16
  export const DataTable = (props) => {
16
17
 
17
- const { columns = [], rows = [], onRowSelection, onSort, onCheckAll, editable, outlined, expanded = false, className, emptyMessage = "No Results Found", multisort = false, filterable = false, onClearFilters } = props
18
+ const { columns = [], rows = [], onRowSelection, onSort, onCheckAll, editable, outlined, expanded = false, className, emptyMessage = "No Results Found", emptyIcon="search_off", multisort = false, filterable = false, onClearFilters } = props
18
19
  const [sortDir, setSortDir] = useState({})
19
20
  const [allChecked, setAllChecked] = useState(false)
20
21
 
@@ -132,10 +133,7 @@ export const DataTable = (props) => {
132
133
  )) : (
133
134
  <tr>
134
135
  <td colSpan={1000}>
135
- <div className='empty-message'>
136
- <Icon icon="search_off" />
137
- <Text>{emptyMessage}</Text>
138
- </div>
136
+ <EmptyMessage icon={emptyIcon ? emptyIcon : "search_off"} text={emptyMessage} className="empty-message" />
139
137
  </td>
140
138
  </tr>
141
139
  )