mirror of
https://github.com/KevinMidboe/immich.git
synced 2026-01-06 01:05:49 +00:00
feat(server,web): improve performances in person page (1) (#4387)
* feat: improve performances in people page * feat: add loadingspinner when searching * fix: reset people on error * fix: case insensitive * feat: better sql query * fix: reset people list before api request * fix: format
This commit is contained in:
@@ -254,9 +254,15 @@
|
||||
if (!edittingPerson || personName === edittingPerson.name) {
|
||||
return;
|
||||
}
|
||||
if (personName === '') {
|
||||
changeName();
|
||||
return;
|
||||
}
|
||||
const { data } = await api.searchApi.searchPerson({ name: personName });
|
||||
|
||||
// We check if another person has the same name as the name entered by the user
|
||||
|
||||
const existingPerson = people.find(
|
||||
const existingPerson = data.find(
|
||||
(person: PersonResponseDto) =>
|
||||
person.name.toLowerCase() === personName.toLowerCase() &&
|
||||
edittingPerson &&
|
||||
|
||||
Reference in New Issue
Block a user