aio-table 6.3.0 → 6.3.1
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/index.js +27 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -991,7 +991,17 @@ class AIOTableUnit extends _react.Component {
|
|
|
991
991
|
let rows;
|
|
992
992
|
|
|
993
993
|
if (search) {
|
|
994
|
-
rows = this.props.rows.filter(o =>
|
|
994
|
+
rows = this.props.rows.filter(o => {
|
|
995
|
+
if (searchText === '') {
|
|
996
|
+
return true;
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
try {
|
|
1000
|
+
return search(o.row, searchText);
|
|
1001
|
+
} catch {
|
|
1002
|
+
return false;
|
|
1003
|
+
}
|
|
1004
|
+
});
|
|
995
1005
|
} else {
|
|
996
1006
|
rows = this.props.rows;
|
|
997
1007
|
}
|
|
@@ -1630,10 +1640,14 @@ class AIOTableCell extends _react.Component {
|
|
|
1630
1640
|
return;
|
|
1631
1641
|
}
|
|
1632
1642
|
|
|
1633
|
-
let newValue =
|
|
1643
|
+
let newValue = value;
|
|
1644
|
+
|
|
1645
|
+
if (type === 'number') {
|
|
1646
|
+
newValue = parseFloat(newValue);
|
|
1634
1647
|
|
|
1635
|
-
|
|
1636
|
-
|
|
1648
|
+
if (isNaN(newValue)) {
|
|
1649
|
+
newValue = 0;
|
|
1650
|
+
}
|
|
1637
1651
|
}
|
|
1638
1652
|
|
|
1639
1653
|
let res = await this.changeCell(newValue);
|
|
@@ -3156,7 +3170,15 @@ function ATFN({
|
|
|
3156
3170
|
};
|
|
3157
3171
|
|
|
3158
3172
|
if (show && search) {
|
|
3159
|
-
|
|
3173
|
+
if (searchText === '') {
|
|
3174
|
+
show = true;
|
|
3175
|
+
} else {
|
|
3176
|
+
try {
|
|
3177
|
+
show = search(row, searchText);
|
|
3178
|
+
} catch {
|
|
3179
|
+
show = false;
|
|
3180
|
+
}
|
|
3181
|
+
}
|
|
3160
3182
|
}
|
|
3161
3183
|
|
|
3162
3184
|
if (show && !onChangeFilter) {
|