@monolith-forensics/monolith-ui 1.2.76 → 1.2.78
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.
|
@@ -150,10 +150,9 @@ const TableProvider = (_a) => {
|
|
|
150
150
|
});
|
|
151
151
|
};
|
|
152
152
|
const searchData = (searchText) => {
|
|
153
|
+
const columnKeys = columnState.map((col) => col.dataField);
|
|
153
154
|
return props.data.filter((row) => {
|
|
154
|
-
return
|
|
155
|
-
.filter((key) => key !== "__key" && key !== "__index")
|
|
156
|
-
.some((key) => {
|
|
155
|
+
return columnKeys.some((key) => {
|
|
157
156
|
if (typeof row[key] === "string") {
|
|
158
157
|
return row[key].toLowerCase().includes(searchText.toLowerCase());
|
|
159
158
|
}
|
package/dist/TagBox/TagBox.js
CHANGED
|
@@ -463,7 +463,7 @@ const TagBox = styled(({ className, data = [], placeholder = "Select tags", arro
|
|
|
463
463
|
const handleChangeSelection = useCallback((option) => {
|
|
464
464
|
const newValue = [..._value, option];
|
|
465
465
|
!isControlled && setValueState(newValue);
|
|
466
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
466
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue.map((v) => v.value), newValue);
|
|
467
467
|
}, [onChange, _value]);
|
|
468
468
|
const handleFocus = () => {
|
|
469
469
|
var _a, _b;
|
|
@@ -487,7 +487,7 @@ const TagBox = styled(({ className, data = [], placeholder = "Select tags", arro
|
|
|
487
487
|
const handleRemoveItem = (item) => {
|
|
488
488
|
const newItems = _value.filter((prevItem, idx) => prevItem.value !== item.value);
|
|
489
489
|
!isControlled && setValueState(newItems);
|
|
490
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newItems);
|
|
490
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newItems.map((v) => v.value), newItems);
|
|
491
491
|
};
|
|
492
492
|
const handleAddItem = useCallback((newItem) => {
|
|
493
493
|
const existingItem = resolvedOptions
|
|
@@ -554,7 +554,7 @@ const TagBox = styled(({ className, data = [], placeholder = "Select tags", arro
|
|
|
554
554
|
if (e.key === "Backspace" && currentInputValue === "") {
|
|
555
555
|
const newItems = _value === null || _value === void 0 ? void 0 : _value.slice(0, _value.length - 1);
|
|
556
556
|
!isControlled && setValueState(newItems);
|
|
557
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newItems);
|
|
557
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newItems.map((v) => v.value), newItems);
|
|
558
558
|
}
|
|
559
559
|
// Arrow down
|
|
560
560
|
if (e.key === "ArrowDown") {
|
package/dist/TagBox/types.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export interface TagBoxProps {
|
|
|
34
34
|
OptionTooltip?: (props: {
|
|
35
35
|
data: any;
|
|
36
36
|
}) => JSX.Element | React.ReactNode;
|
|
37
|
-
onChange?: (value:
|
|
37
|
+
onChange?: (value: unknown[], options?: Option[]) => void;
|
|
38
38
|
onScroll?: (e: any) => void;
|
|
39
39
|
onSearch?: (value: string) => void;
|
|
40
40
|
searchFn?: (value: string) => void;
|