fix: ordering
This commit is contained in:
@@ -63,6 +63,7 @@ namespace CarManagerV2
|
||||
{
|
||||
// no changes
|
||||
Console.WriteLine($"[L] No changes for car: {car.Id}");
|
||||
flpCars.Controls.SetChildIndex(existing, _cars.IndexOf(car));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -95,10 +96,12 @@ namespace CarManagerV2
|
||||
};
|
||||
detailsForm.ShowDialog();
|
||||
};
|
||||
|
||||
if (isNew)
|
||||
{
|
||||
flpCars.Controls.Add(card);
|
||||
}
|
||||
flpCars.Controls.SetChildIndex(card, _cars.IndexOf(car));
|
||||
}
|
||||
|
||||
// Remove cards that are no longer in _cars
|
||||
@@ -153,7 +156,7 @@ namespace CarManagerV2
|
||||
string query = tbxSearch.Text;
|
||||
await Task.Delay(300); // debounce
|
||||
if(query != tbxSearch.Text) return; // text changed during delay
|
||||
flpCars.Controls.Clear();
|
||||
//flpCars.Controls.Clear();
|
||||
if (string.IsNullOrWhiteSpace(query))
|
||||
{
|
||||
refreshCars(cars);
|
||||
|
||||
Reference in New Issue
Block a user