@bluemarble/bm-components 1.12.1 → 1.13.0
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.d.mts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4694,8 +4694,10 @@ function getObjectValue(obj) {
|
|
|
4694
4694
|
}
|
|
4695
4695
|
|
|
4696
4696
|
// src/hooks/useFilter.ts
|
|
4697
|
-
function useFilter() {
|
|
4698
|
-
const [selectedFilters, setSelectedFilters] = useState6(
|
|
4697
|
+
function useFilter(props) {
|
|
4698
|
+
const [selectedFilters, setSelectedFilters] = useState6(
|
|
4699
|
+
props.defaultFilters || []
|
|
4700
|
+
);
|
|
4699
4701
|
const filterBy = useCallback4((newFilter) => {
|
|
4700
4702
|
const propToCompare = (newFilter == null ? void 0 : newFilter.id) ? "id" : "prop";
|
|
4701
4703
|
function removeRepeatedFilters(filter) {
|
|
@@ -4902,6 +4904,8 @@ function useGrid({
|
|
|
4902
4904
|
};
|
|
4903
4905
|
}
|
|
4904
4906
|
function searchKeysForValue(row, compare) {
|
|
4907
|
+
if (typeof row === "undefined")
|
|
4908
|
+
return false;
|
|
4905
4909
|
const rowKeys = Object.keys(row);
|
|
4906
4910
|
let match = false;
|
|
4907
4911
|
const isNumberOrString = (value) => ["number", "string"].includes(typeof value);
|