feat(GatewayAutocomplete): improve gateway filtering logic to show full list when a gateway is selected, enhancing user experience
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 3m36s

This commit is contained in:
2026-02-10 18:15:38 +07:00
parent b2b3933d2d
commit 5e0397f667
+10 -1
View File
@@ -344,8 +344,17 @@ function GatewayAutocomplete({ label, value, onChange, gateways = [], required =
}, [value]);
// Фильтруем gateways по введённому тексту
// ВАЖНО: когда в поле уже выбран gateway (inputValue === value),
// показываем ПОЛНЫЙ список, чтобы можно было сразу выбрать другой.
const filteredGateways = gateways.filter(gw => {
const search = inputValue.toLowerCase();
const raw = inputValue || '';
const search = raw.toLowerCase().trim();
// Пустой ввод или просто отображение выбранного значения -> полный список
if (!search || raw === value) {
return true;
}
return (
gw.name.toLowerCase().includes(search) ||
(gw.ip && gw.ip.toLowerCase().includes(search)) ||