5sControl / 5sControl/5s-frontend

[1h] fix bug with adding the 2nd zone on "Camera Settings"

Open
#485 1 comment 0 reactions 1 assignee Claimed by @AlexGurski View on GitHub
bug
Dominant language
TypeScript
Stars
3
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Summary: Данные из только что созданного поля дублируются в следующее поле при создании Зоны в окне "Camera Settings"
Precondition: Пользователь авторизован, открыта страница "Configuration"
Environment: 5S Control version:v0.4.3
http://192.168.1.111:3000
Windows 11, Chrome 114

STR:
1. Кликнуть по вкладке любой камеры
2. Кликнуть по вкладке "Zones" в окне "Camera Settings"
3. Кликнуть по кнопке "Add Zone"
4. Заполнить поле "Name"
5. Кликнуть по кнопке "Save"
6. Кликнуть по кнопке "Add Zone"
Expected result: При создании следующей зоны, поле "Name" пустое
Actual result: При создании следующей зоны, поле "Name" заполняется данными из предыдущего поля
Attachments: https://github.com/5sControl/django-front/assets/122295113/1e8edd1f-363e-4cf7-ac9c-0a4ebf7f4d2b

Contributor guide

Open the contributing guide

Research direction

Look at the 'Camera Settings' page, specifically the 'Zones' tab and the 'Add Zone' component. The bug is that a newly created zone's 'Name' field is pre-filled with data from the previous zone. Examine the form state management and how the input fields are reset after saving. Check the relevant React component files for the zone creation logic.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.