Skip to content

Commit 8d6fa88

Browse files
author
Nika Kolesnikova
committed
fix: give ids to form in ListItem and input in List
1 parent 8d76efd commit 8d6fa88

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/components/ListItem.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ export function ListItem({ item, listPath, itemUrgencyStatus }) {
132132
arrow
133133
>
134134
<Checkbox
135+
id={id}
135136
edge="start"
136137
checked={isPurchased}
137138
tabIndex={-1}

src/views/List.jsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import { ListItem, AddItems, TextInputElement } from '../components';
1111
// operations like filtering and sorting items.
1212

1313
export const List = React.memo(function List({ data, listPath }) {
14-
// Redirect to home if no list path is null
15-
if (useEnsureListPath()) return <></>;
1614
const { urgencyObject } = useUrgency(data);
1715
const [searchItem, setSearchItem] = useState('');
1816

17+
// Redirect to home if no list path is nulls
18+
if (useEnsureListPath()) return <></>;
1919
const listName = listPath.slice(listPath.indexOf('/') + 1);
2020

2121
const sortedItems = Object.values(urgencyObject).flat();
@@ -47,11 +47,14 @@ export const List = React.memo(function List({ data, listPath }) {
4747
columns={16}
4848
justifyContent="space-between"
4949
>
50-
<Grid item size={{ xs: 2, sm: 4, md: 4 }}>
50+
<Grid size={{ xs: 2, sm: 4, md: 4 }}>
5151
<AddItems items={data} />
5252
</Grid>
53-
<Grid item size={{ xs: 2, sm: 4, md: 4 }}>
54-
<form onSubmit={(event) => event.preventDefault()}>
53+
<Grid size={{ xs: 2, sm: 4, md: 4 }}>
54+
<form
55+
id="search-item-form"
56+
onSubmit={(event) => event.preventDefault()}
57+
>
5558
<TextInputElement
5659
id="search-item"
5760
type="search"

0 commit comments

Comments
 (0)