@bluemarble/bm-components 0.1.3 → 0.1.4
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.js +8 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4172,18 +4172,20 @@ function useFormHelper() {
|
|
|
4172
4172
|
|
|
4173
4173
|
// src/components/utils/getObjectValue.ts
|
|
4174
4174
|
function getObjectValue(obj) {
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4175
|
+
return (prop) => {
|
|
4176
|
+
try {
|
|
4177
|
+
return prop.split(".").reduce((o, k) => o[k], obj);
|
|
4178
|
+
} catch (error) {
|
|
4179
|
+
return void 0;
|
|
4180
|
+
}
|
|
4181
|
+
};
|
|
4180
4182
|
}
|
|
4181
4183
|
|
|
4182
4184
|
// src/hooks/useFilter.ts
|
|
4183
4185
|
function useFilter() {
|
|
4184
4186
|
const [selectedFilters, setSelectedFilters] = _react.useState.call(void 0, []);
|
|
4185
4187
|
const filterBy = (newFilter) => {
|
|
4186
|
-
const propToCompare = newFilter.id ? "id" : "prop";
|
|
4188
|
+
const propToCompare = (newFilter == null ? void 0 : newFilter.id) ? "id" : "prop";
|
|
4187
4189
|
function removeRepeatedFilters(filter) {
|
|
4188
4190
|
return filter[propToCompare] !== newFilter[propToCompare];
|
|
4189
4191
|
}
|