Commit 607b6d4c by t0ng7u

🐛 fix(models): eliminate vendor column flicker by loading vendors before models

Why:
• The vendor list API is separate from the models API, causing the “Vendor” column in `ModelsTable` to flash (rendering `'-'` first, then updating) after the table finishes loading.
• This visual jump degrades the user experience.

What:
• Updated `web/src/hooks/models/useModelsData.js`
  – In the initial `useEffect`, vendors are fetched first with `loadVendors()` and awaited.
  – Only after vendors are ready do we call `loadModels()`, ensuring `vendorMap` is populated before the table renders.

Outcome:
• The table now renders with complete vendor data on first paint, removing the flicker and providing a smoother UI.
parent a436f81e
......@@ -333,8 +333,11 @@ export const useModelsData = () => {
// Initial load
useEffect(() => {
loadVendors();
loadModels();
(async () => {
await loadVendors();
await loadModels();
})();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
return {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment