ywana-core8 0.0.947 → 0.0.948

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.947",
3
+ "version": "0.0.948",
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
@@ -123,7 +123,7 @@ export const DataTable = (props) => {
123
123
  </thead>
124
124
  <tbody>
125
125
 
126
- {filterable ? <DataTableFiltersRow columns={columns} /> : null}
126
+ {filterable ? <DataTableFiltersRow columns={columns} onClear={onClearFilters} /> : null}
127
127
 
128
128
  {rows.length > 0 ?
129
129
  multiSort(rows, sortDir).map((row, index) => (
@@ -148,7 +148,7 @@ export const DataTable = (props) => {
148
148
  /**
149
149
  * DataTableFiltersRow
150
150
  */
151
- const DataTableFiltersRow = ({ columns }) => {
151
+ const DataTableFiltersRow = ({ columns, onClear }) => {
152
152
 
153
153
  const [form, setForm] = useState({})
154
154
 
@@ -159,7 +159,7 @@ const DataTableFiltersRow = ({ columns }) => {
159
159
 
160
160
  function clear() {
161
161
  setForm({})
162
- if (onFilter) onFilter({})
162
+ if (onClear) onClear()
163
163
  }
164
164
 
165
165
  const dirty = Object.keys(form).length > 0 // dirty if there are filters set