Skip to content

make a 500ms debounce search input (both journal & active)#50

Merged
didu4 merged 2 commits intomainfrom
rental-search-debounce
Mar 2, 2026
Merged

make a 500ms debounce search input (both journal & active)#50
didu4 merged 2 commits intomainfrom
rental-search-debounce

Conversation

@didu4
Copy link
Contributor

@didu4 didu4 commented Feb 28, 2026

Изменения

Реализовал дебаунс поиска студента по id в разделах "Архив" и "Текущие" в админке;
В архиве работает для всех обеих секций "Завершенные" и "Отмененные"

Детали реализации

Сменил функцию handleSearchById() на дебаунс-функцию handleSearchInput()

Check-List

  • Вы проверили свой код перед отправкой запроса?
  • Вы написали тесты к реализованным функциям?
  • Вы не забыли применить форматирование black и isort для Back-End или Prettier для Front-End?

@didu4 didu4 requested a review from BatuevIO February 28, 2026 12:53
}, 500);
}

onMounted(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Тут можно вместо этого использовать onUnmounted

const { activePageSessions } = storeToRefs(adminStore);

const userId = ref<string>();
const searchTimeout = ref<ReturnType<typeof setTimeout> | null>(null);
Copy link
Contributor

Choose a reason for hiding this comment

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

А зачем реактивность?

Copy link
Contributor

Choose a reason for hiding this comment

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

Аналогично тут

@didu4 didu4 merged commit e7b8a49 into main Mar 2, 2026
2 checks passed
@didu4 didu4 deleted the rental-search-debounce branch March 2, 2026 18:14
@BatuevIO BatuevIO linked an issue Mar 5, 2026 that may be closed by this pull request
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.

Корректный поиск пользователя

2 participants