Skip to content

Comments

Add task solution#1276

Open
Stas-collab wants to merge 3 commits intomate-academy:masterfrom
Stas-collab:develop
Open

Add task solution#1276
Stas-collab wants to merge 3 commits intomate-academy:masterfrom
Stas-collab:develop

Conversation

@Stas-collab
Copy link

Copy link

@Denys-Kravchuk9988 Denys-Kravchuk9988 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

A few things to improve:

  1. I would recommend to make this input to fit the width of ToDo container
Image
  1. Clear completed button should be disabled or hidden when there isn't any completed task in list
Image

@Denys-Kravchuk9988
Copy link

It's also needed to try to pass all tests

Copy link

@2pasha 2pasha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job! 👏

fix comments below ⬇️

Comment on lines 72 to 83
onBlur={() => {
const trimmed = editValue.trim();

if (trimmed === '') {
dispatch({ type: 'DELETE', payload: todo.id });
} else {
dispatch({
type: 'FINISH_EDIT',
payload: { id: todo.id, title: editValue },
});
}
}}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to separate fn

Comment on lines 86 to 92
onKeyDown={e => {
if (e.key === 'Escape') {
dispatch({ type: 'CANCEL_EDIT' });
}
}}
onChange={e => setEditValue(e.target.value)}
/>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to separate fn

Comment on lines 100 to 103
onDoubleClick={() => {
setEditValue(todo.title);
dispatch({ type: 'START_EDIT', payload: todo.id });
}}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to separate fn

@Stas-collab Stas-collab requested a review from 2pasha February 20, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants