math-main-components 0.0.43 → 0.0.44
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/components/CardButton/CardButton.d.ts +2 -2
- package/dist/components/Dialog/Dialog.d.ts +2 -2
- package/dist/components/OptionFieldHorizontal/OptionFieldHorizontal.d.ts +2 -2
- package/dist/components/RadioButtons/RadioButtons.d.ts +2 -2
- package/dist/components/Table/Table.d.ts +3 -3
- package/dist/index.cjs.js +19 -16
- package/dist/index.esm.js +19 -16
- package/package.json +1 -1
@@ -1,6 +1,6 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import React, { MouseEvent } from 'react';
|
2
2
|
export declare function CardButton({ title, iconName, onClick, }: {
|
3
3
|
title: string;
|
4
4
|
iconName: string;
|
5
|
-
onClick?: (event:
|
5
|
+
onClick?: (event: MouseEvent<HTMLDivElement>) => {};
|
6
6
|
}): React.JSX.Element;
|
@@ -6,7 +6,7 @@ export interface DialogData {
|
|
6
6
|
export declare function Dialog({ data, text, onClose, onSubmit, children }: {
|
7
7
|
data?: DialogData;
|
8
8
|
text?: any;
|
9
|
-
onClose?: (event: React.MouseEvent<HTMLDivElement>, data
|
10
|
-
onSubmit?: (event: React.MouseEvent<HTMLButtonElement>, data
|
9
|
+
onClose?: (event: React.MouseEvent<HTMLDivElement | HTMLButtonElement>, data?: any | undefined) => void;
|
10
|
+
onSubmit?: (event: React.MouseEvent<HTMLButtonElement>, data?: any | undefined) => void;
|
11
11
|
children: any;
|
12
12
|
}): React.JSX.Element;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import React, { MouseEvent } from 'react';
|
2
2
|
export declare function OptionFieldHorizontal({ title, iconName, onClick, preselected }: {
|
3
3
|
title: string;
|
4
4
|
iconName?: string;
|
5
|
-
onClick?: (event:
|
5
|
+
onClick?: (event: MouseEvent<HTMLDivElement>) => void;
|
6
6
|
preselected?: boolean;
|
7
7
|
}): React.JSX.Element;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import React, { MouseEvent } from 'react';
|
2
2
|
export declare class RadioOption {
|
3
3
|
text: string;
|
4
4
|
name: string;
|
@@ -8,6 +8,6 @@ export declare function RadioButtons({ options, group, selected, onClick, width
|
|
8
8
|
options: RadioOption[];
|
9
9
|
group: string;
|
10
10
|
selected?: string;
|
11
|
-
onClick?: (event:
|
11
|
+
onClick?: (event: MouseEvent<HTMLInputElement>) => void;
|
12
12
|
width?: string;
|
13
13
|
}): React.JSX.Element;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import React, { MouseEvent } from 'react';
|
2
2
|
export declare enum TableActionType {
|
3
3
|
red = 0,
|
4
4
|
default = 1
|
@@ -14,9 +14,9 @@ export declare class TableItem {
|
|
14
14
|
export declare class TableItemAction {
|
15
15
|
title: string;
|
16
16
|
iconName: string;
|
17
|
-
onClick: (event:
|
17
|
+
onClick: (event: MouseEvent<HTMLDivElement>, item: TableItem, index: number) => void;
|
18
18
|
type: TableActionType;
|
19
|
-
constructor(title: string, iconName: string, type: TableActionType, onClick?: (event:
|
19
|
+
constructor(title: string, iconName: string, type: TableActionType, onClick?: (event: MouseEvent<HTMLDivElement>, item: TableItem, index: number) => void);
|
20
20
|
}
|
21
21
|
export declare function Table({ items, title, actions, moreActions }: {
|
22
22
|
items: TableItem[];
|
package/dist/index.cjs.js
CHANGED
@@ -134,11 +134,11 @@ var css_248z$m = ".styles-module_container__9-1MH {\n position: fixed;\n heigh
|
|
134
134
|
var styles$m = {"container":"styles-module_container__9-1MH","active":"styles-module_active__AXoyo","disabled":"styles-module_disabled__sELpy","dialog_window":"styles-module_dialog_window__0Bn2M","cancel_button":"styles-module_cancel_button__KhwLS","submit_button":"styles-module_submit_button__xLzux"};
|
135
135
|
styleInject(css_248z$m);
|
136
136
|
|
137
|
-
function Dialog({ data, text, onClose
|
137
|
+
function Dialog({ data, text, onClose, onSubmit, children }) {
|
138
138
|
function onClick(event) {
|
139
|
-
if (event.
|
140
|
-
if (
|
141
|
-
onClose(event, data
|
139
|
+
if (event.currentTarget.id == 'dialog-backdrop' || event.currentTarget.id == 'cancel-button') {
|
140
|
+
if (onClose)
|
141
|
+
onClose(event, data?.data);
|
142
142
|
}
|
143
143
|
}
|
144
144
|
return (React__default["default"].createElement("div", { id: "dialog-backdrop", className: `${styles$m.container} ${data?.isActive ? styles$m.active : styles$m.disabled}`, onClick: onClick },
|
@@ -146,7 +146,7 @@ function Dialog({ data, text, onClose = (event, data) => { }, onSubmit = (event,
|
|
146
146
|
children,
|
147
147
|
text && React__default["default"].createElement("h1", null, text),
|
148
148
|
React__default["default"].createElement("button", { className: styles$m.cancel_button, id: "cancel-button", onClick: onClick }, "Abbrechen"),
|
149
|
-
React__default["default"].createElement("button", { className: styles$m.submit_button, id: "submit-button", onClick: (event) => onSubmit(event, data?.data) }, "Best\u00E4tigen"))));
|
149
|
+
React__default["default"].createElement("button", { className: styles$m.submit_button, id: "submit-button", onClick: (event) => onSubmit && onSubmit(event, data?.data) }, "Best\u00E4tigen"))));
|
150
150
|
}
|
151
151
|
|
152
152
|
var css_248z$l = ".styles-module_container__HOoBj {\n margin-bottom: 30px;\n}\n.styles-module_container__HOoBj button {\n padding: 12px 18px;\n border-radius: 40px;\n border: none;\n color: white;\n font-size: 16px;\n background: #0075FF;\n cursor: pointer;\n display: flex;\n flex-direction: row;\n gap: 10px;\n align-items: center;\n}";
|
@@ -197,7 +197,7 @@ function InputMail({ placeholder = "E-Mail-Adresse", title = "E-Mail-Adresse", n
|
|
197
197
|
const [value, setValue] = React.useState("");
|
198
198
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
199
199
|
React__default["default"].createElement("div", { className: styles$i.container, style: { width: width } },
|
200
|
-
React__default["default"].createElement("input", { className: `${styles$i.input} ${title != undefined ? styles$i.with_title : styles$i.without_title} ${value.length > 0 ? styles$i.valid : styles$i.not_valid} ${available ? styles$i.available : styles$i.not_available}`, name: name, placeholder: placeholder, type: "email", onInput: (event) => setValue(event.
|
200
|
+
React__default["default"].createElement("input", { className: `${styles$i.input} ${title != undefined ? styles$i.with_title : styles$i.without_title} ${value.length > 0 ? styles$i.valid : styles$i.not_valid} ${available ? styles$i.available : styles$i.not_available}`, name: name, placeholder: placeholder, type: "email", onInput: (event) => setValue(event.currentTarget.value) }),
|
201
201
|
React__default["default"].createElement("label", { htmlFor: "text", className: styles$i.label },
|
202
202
|
React__default["default"].createElement("span", { className: styles$i.label_text }, title)))));
|
203
203
|
}
|
@@ -210,12 +210,12 @@ function InputNames({ width = "100%", placeholder = { firstName: "", lastName: "
|
|
210
210
|
const [value1, setValue1] = React.useState(defaultValue.firstName ? defaultValue.firstName : "");
|
211
211
|
const [value2, setValue2] = React.useState(defaultValue.lastName ? defaultValue.lastName : "");
|
212
212
|
function onInput1(event) {
|
213
|
-
setValue1(event.
|
213
|
+
setValue1(event.currentTarget.value);
|
214
214
|
onInputFirstName(event);
|
215
215
|
onInput("firstName", event);
|
216
216
|
}
|
217
217
|
function onInput2(event) {
|
218
|
-
setValue2(event.
|
218
|
+
setValue2(event.currentTarget.value);
|
219
219
|
onInputLastName(event);
|
220
220
|
onInput("lastName", event);
|
221
221
|
}
|
@@ -243,7 +243,7 @@ function InputNumber({ title, name, placeholder = "", defaultValue = "", autoFoc
|
|
243
243
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
244
244
|
React__default["default"].createElement("div", { className: styles$g.container, style: { width } },
|
245
245
|
React__default["default"].createElement("input", { className: `${styles$g.input} ${title != undefined ? styles$g.with_title : styles$g.without_title} ${value.length > 0 || defaultValue.length > 0 ? styles$g.valid : styles$g.not_valid} ${available ? styles$g.available : styles$g.not_available}`, name: name, type: type, placeholder: placeholder, ref: inputElement, defaultValue: defaultValue, onInput: (event) => {
|
246
|
-
setValue(event.
|
246
|
+
setValue(event.currentTarget.value);
|
247
247
|
onInput(event);
|
248
248
|
} }),
|
249
249
|
React__default["default"].createElement("label", { htmlFor: "text", className: styles$g.label },
|
@@ -260,7 +260,7 @@ function InputPassword({ placeholder = "", title = "Passwort", name, isVisible =
|
|
260
260
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
261
261
|
React__default["default"].createElement("div", { className: `${styles$f.container} ${isVisible ? styles$f.visible : styles$f.hidden}`, style: { width: width } },
|
262
262
|
React__default["default"].createElement("div", { className: styles$f.form },
|
263
|
-
React__default["default"].createElement("input", { className: `${styles$f.input} ${title != undefined ? styles$f.with_title : styles$f.without_title} ${value.length > 0 ? styles$f.valid : styles$f.not_valid}`, name: name, minLength: minLength, autoComplete: autoComplete, placeholder: placeholder, type: hidePassword ? "password" : "text", onInput: (event) => setValue(event.
|
263
|
+
React__default["default"].createElement("input", { className: `${styles$f.input} ${title != undefined ? styles$f.with_title : styles$f.without_title} ${value.length > 0 ? styles$f.valid : styles$f.not_valid}`, name: name, minLength: minLength, autoComplete: autoComplete, placeholder: placeholder, type: hidePassword ? "password" : "text", onInput: (event) => setValue(event.currentTarget.value) }),
|
264
264
|
React__default["default"].createElement("label", { htmlFor: "text", className: styles$f.label },
|
265
265
|
React__default["default"].createElement("span", { className: styles$f.label_text }, title)),
|
266
266
|
React__default["default"].createElement("button", { title: hidePassword ? "Passwort anzeigen" : "Passwort verstecken", className: styles$f.hideButton, onClick: () => setHidePassword(!hidePassword), type: "button" },
|
@@ -279,7 +279,7 @@ function InputPin({ name, length, onFinished = () => { } }) {
|
|
279
279
|
fieldRefs.current = [...Array(length)].map((_, i) => fieldRefs.current[i] ?? React.createRef());
|
280
280
|
function onChange(event, position) {
|
281
281
|
const regex = /[0-9]+/;
|
282
|
-
const value = event.
|
282
|
+
const value = event.currentTarget.value ? event.currentTarget.value.replace(" ", "") : "";
|
283
283
|
if (value == '' || !regex.test(value))
|
284
284
|
return;
|
285
285
|
const digitCountBefore = state[position] == undefined ? 0 : String(state[position]).length;
|
@@ -349,7 +349,7 @@ function InputText({ title, name, placeholder = "", defaultValue = "", autoFocus
|
|
349
349
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
350
350
|
React__default["default"].createElement("div", { className: styles$d.container, style: { width, marginBottom } },
|
351
351
|
React__default["default"].createElement("input", { className: `${styles$d.input} ${title != undefined ? styles$d.with_title : styles$d.without_title} ${value.length > 0 || defaultValue.length > 0 ? styles$d.valid : styles$d.not_valid} ${available ? styles$d.available : styles$d.not_available}`, name: name, type: type, placeholder: placeholder, ref: inputElement, defaultValue: defaultValue, onInput: (event) => {
|
352
|
-
setValue(event.
|
352
|
+
setValue(event.currentTarget.value);
|
353
353
|
onInput(event);
|
354
354
|
} }),
|
355
355
|
React__default["default"].createElement("label", { htmlFor: "text", className: styles$d.label },
|
@@ -426,7 +426,7 @@ class RadioOption {
|
|
426
426
|
function RadioButtons({ options, group, selected, onClick, width = "100%" }) {
|
427
427
|
const [selectedOption, setSelected] = React.useState(selected);
|
428
428
|
function onUpdateSelected(event) {
|
429
|
-
setSelected(event.
|
429
|
+
setSelected(event.currentTarget.value);
|
430
430
|
if (onClick)
|
431
431
|
onClick(event);
|
432
432
|
}
|
@@ -504,17 +504,20 @@ function Searchbar({ placeholder, title = "Suchen", showNoResults = false, error
|
|
504
504
|
const [inputFocused, setFocused] = React.useState(false);
|
505
505
|
const [searchResults, setSearchResults] = React.useState(results);
|
506
506
|
function onInputChanged(event) {
|
507
|
-
|
507
|
+
event.preventDefault();
|
508
|
+
setValue(event.currentTarget.value);
|
508
509
|
updateSearch(event);
|
509
510
|
onInput(event);
|
510
511
|
}
|
511
512
|
function updateSearch(event) {
|
512
|
-
|
513
|
+
event.preventDefault();
|
514
|
+
const value = event.currentTarget.value;
|
515
|
+
if (value == '' || value == undefined || value == null) {
|
513
516
|
setSearchResults(results);
|
514
517
|
}
|
515
518
|
else {
|
516
519
|
setSearchResults(results.filter((result) => {
|
517
|
-
return result.title.includes(event.
|
520
|
+
return result.title.includes(event.currentTarget.value);
|
518
521
|
}));
|
519
522
|
}
|
520
523
|
}
|
package/dist/index.esm.js
CHANGED
@@ -126,11 +126,11 @@ var css_248z$m = ".styles-module_container__9-1MH {\n position: fixed;\n heigh
|
|
126
126
|
var styles$m = {"container":"styles-module_container__9-1MH","active":"styles-module_active__AXoyo","disabled":"styles-module_disabled__sELpy","dialog_window":"styles-module_dialog_window__0Bn2M","cancel_button":"styles-module_cancel_button__KhwLS","submit_button":"styles-module_submit_button__xLzux"};
|
127
127
|
styleInject(css_248z$m);
|
128
128
|
|
129
|
-
function Dialog({ data, text, onClose
|
129
|
+
function Dialog({ data, text, onClose, onSubmit, children }) {
|
130
130
|
function onClick(event) {
|
131
|
-
if (event.
|
132
|
-
if (
|
133
|
-
onClose(event, data
|
131
|
+
if (event.currentTarget.id == 'dialog-backdrop' || event.currentTarget.id == 'cancel-button') {
|
132
|
+
if (onClose)
|
133
|
+
onClose(event, data?.data);
|
134
134
|
}
|
135
135
|
}
|
136
136
|
return (React.createElement("div", { id: "dialog-backdrop", className: `${styles$m.container} ${data?.isActive ? styles$m.active : styles$m.disabled}`, onClick: onClick },
|
@@ -138,7 +138,7 @@ function Dialog({ data, text, onClose = (event, data) => { }, onSubmit = (event,
|
|
138
138
|
children,
|
139
139
|
text && React.createElement("h1", null, text),
|
140
140
|
React.createElement("button", { className: styles$m.cancel_button, id: "cancel-button", onClick: onClick }, "Abbrechen"),
|
141
|
-
React.createElement("button", { className: styles$m.submit_button, id: "submit-button", onClick: (event) => onSubmit(event, data?.data) }, "Best\u00E4tigen"))));
|
141
|
+
React.createElement("button", { className: styles$m.submit_button, id: "submit-button", onClick: (event) => onSubmit && onSubmit(event, data?.data) }, "Best\u00E4tigen"))));
|
142
142
|
}
|
143
143
|
|
144
144
|
var css_248z$l = ".styles-module_container__HOoBj {\n margin-bottom: 30px;\n}\n.styles-module_container__HOoBj button {\n padding: 12px 18px;\n border-radius: 40px;\n border: none;\n color: white;\n font-size: 16px;\n background: #0075FF;\n cursor: pointer;\n display: flex;\n flex-direction: row;\n gap: 10px;\n align-items: center;\n}";
|
@@ -189,7 +189,7 @@ function InputMail({ placeholder = "E-Mail-Adresse", title = "E-Mail-Adresse", n
|
|
189
189
|
const [value, setValue] = useState("");
|
190
190
|
return (React.createElement(React.Fragment, null,
|
191
191
|
React.createElement("div", { className: styles$i.container, style: { width: width } },
|
192
|
-
React.createElement("input", { className: `${styles$i.input} ${title != undefined ? styles$i.with_title : styles$i.without_title} ${value.length > 0 ? styles$i.valid : styles$i.not_valid} ${available ? styles$i.available : styles$i.not_available}`, name: name, placeholder: placeholder, type: "email", onInput: (event) => setValue(event.
|
192
|
+
React.createElement("input", { className: `${styles$i.input} ${title != undefined ? styles$i.with_title : styles$i.without_title} ${value.length > 0 ? styles$i.valid : styles$i.not_valid} ${available ? styles$i.available : styles$i.not_available}`, name: name, placeholder: placeholder, type: "email", onInput: (event) => setValue(event.currentTarget.value) }),
|
193
193
|
React.createElement("label", { htmlFor: "text", className: styles$i.label },
|
194
194
|
React.createElement("span", { className: styles$i.label_text }, title)))));
|
195
195
|
}
|
@@ -202,12 +202,12 @@ function InputNames({ width = "100%", placeholder = { firstName: "", lastName: "
|
|
202
202
|
const [value1, setValue1] = useState(defaultValue.firstName ? defaultValue.firstName : "");
|
203
203
|
const [value2, setValue2] = useState(defaultValue.lastName ? defaultValue.lastName : "");
|
204
204
|
function onInput1(event) {
|
205
|
-
setValue1(event.
|
205
|
+
setValue1(event.currentTarget.value);
|
206
206
|
onInputFirstName(event);
|
207
207
|
onInput("firstName", event);
|
208
208
|
}
|
209
209
|
function onInput2(event) {
|
210
|
-
setValue2(event.
|
210
|
+
setValue2(event.currentTarget.value);
|
211
211
|
onInputLastName(event);
|
212
212
|
onInput("lastName", event);
|
213
213
|
}
|
@@ -235,7 +235,7 @@ function InputNumber({ title, name, placeholder = "", defaultValue = "", autoFoc
|
|
235
235
|
return (React.createElement(React.Fragment, null,
|
236
236
|
React.createElement("div", { className: styles$g.container, style: { width } },
|
237
237
|
React.createElement("input", { className: `${styles$g.input} ${title != undefined ? styles$g.with_title : styles$g.without_title} ${value.length > 0 || defaultValue.length > 0 ? styles$g.valid : styles$g.not_valid} ${available ? styles$g.available : styles$g.not_available}`, name: name, type: type, placeholder: placeholder, ref: inputElement, defaultValue: defaultValue, onInput: (event) => {
|
238
|
-
setValue(event.
|
238
|
+
setValue(event.currentTarget.value);
|
239
239
|
onInput(event);
|
240
240
|
} }),
|
241
241
|
React.createElement("label", { htmlFor: "text", className: styles$g.label },
|
@@ -252,7 +252,7 @@ function InputPassword({ placeholder = "", title = "Passwort", name, isVisible =
|
|
252
252
|
return (React.createElement(React.Fragment, null,
|
253
253
|
React.createElement("div", { className: `${styles$f.container} ${isVisible ? styles$f.visible : styles$f.hidden}`, style: { width: width } },
|
254
254
|
React.createElement("div", { className: styles$f.form },
|
255
|
-
React.createElement("input", { className: `${styles$f.input} ${title != undefined ? styles$f.with_title : styles$f.without_title} ${value.length > 0 ? styles$f.valid : styles$f.not_valid}`, name: name, minLength: minLength, autoComplete: autoComplete, placeholder: placeholder, type: hidePassword ? "password" : "text", onInput: (event) => setValue(event.
|
255
|
+
React.createElement("input", { className: `${styles$f.input} ${title != undefined ? styles$f.with_title : styles$f.without_title} ${value.length > 0 ? styles$f.valid : styles$f.not_valid}`, name: name, minLength: minLength, autoComplete: autoComplete, placeholder: placeholder, type: hidePassword ? "password" : "text", onInput: (event) => setValue(event.currentTarget.value) }),
|
256
256
|
React.createElement("label", { htmlFor: "text", className: styles$f.label },
|
257
257
|
React.createElement("span", { className: styles$f.label_text }, title)),
|
258
258
|
React.createElement("button", { title: hidePassword ? "Passwort anzeigen" : "Passwort verstecken", className: styles$f.hideButton, onClick: () => setHidePassword(!hidePassword), type: "button" },
|
@@ -271,7 +271,7 @@ function InputPin({ name, length, onFinished = () => { } }) {
|
|
271
271
|
fieldRefs.current = [...Array(length)].map((_, i) => fieldRefs.current[i] ?? createRef());
|
272
272
|
function onChange(event, position) {
|
273
273
|
const regex = /[0-9]+/;
|
274
|
-
const value = event.
|
274
|
+
const value = event.currentTarget.value ? event.currentTarget.value.replace(" ", "") : "";
|
275
275
|
if (value == '' || !regex.test(value))
|
276
276
|
return;
|
277
277
|
const digitCountBefore = state[position] == undefined ? 0 : String(state[position]).length;
|
@@ -341,7 +341,7 @@ function InputText({ title, name, placeholder = "", defaultValue = "", autoFocus
|
|
341
341
|
return (React.createElement(React.Fragment, null,
|
342
342
|
React.createElement("div", { className: styles$d.container, style: { width, marginBottom } },
|
343
343
|
React.createElement("input", { className: `${styles$d.input} ${title != undefined ? styles$d.with_title : styles$d.without_title} ${value.length > 0 || defaultValue.length > 0 ? styles$d.valid : styles$d.not_valid} ${available ? styles$d.available : styles$d.not_available}`, name: name, type: type, placeholder: placeholder, ref: inputElement, defaultValue: defaultValue, onInput: (event) => {
|
344
|
-
setValue(event.
|
344
|
+
setValue(event.currentTarget.value);
|
345
345
|
onInput(event);
|
346
346
|
} }),
|
347
347
|
React.createElement("label", { htmlFor: "text", className: styles$d.label },
|
@@ -418,7 +418,7 @@ class RadioOption {
|
|
418
418
|
function RadioButtons({ options, group, selected, onClick, width = "100%" }) {
|
419
419
|
const [selectedOption, setSelected] = useState(selected);
|
420
420
|
function onUpdateSelected(event) {
|
421
|
-
setSelected(event.
|
421
|
+
setSelected(event.currentTarget.value);
|
422
422
|
if (onClick)
|
423
423
|
onClick(event);
|
424
424
|
}
|
@@ -496,17 +496,20 @@ function Searchbar({ placeholder, title = "Suchen", showNoResults = false, error
|
|
496
496
|
const [inputFocused, setFocused] = useState(false);
|
497
497
|
const [searchResults, setSearchResults] = useState(results);
|
498
498
|
function onInputChanged(event) {
|
499
|
-
|
499
|
+
event.preventDefault();
|
500
|
+
setValue(event.currentTarget.value);
|
500
501
|
updateSearch(event);
|
501
502
|
onInput(event);
|
502
503
|
}
|
503
504
|
function updateSearch(event) {
|
504
|
-
|
505
|
+
event.preventDefault();
|
506
|
+
const value = event.currentTarget.value;
|
507
|
+
if (value == '' || value == undefined || value == null) {
|
505
508
|
setSearchResults(results);
|
506
509
|
}
|
507
510
|
else {
|
508
511
|
setSearchResults(results.filter((result) => {
|
509
|
-
return result.title.includes(event.
|
512
|
+
return result.title.includes(event.currentTarget.value);
|
510
513
|
}));
|
511
514
|
}
|
512
515
|
}
|