mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
fix(autocomplete): fix dropdown width calculation bug
Temporarily remove width constraints when measuring content to prevent scrollWidth from being limited by narrow container. This fixes the issue where dropdown width was incorrectly calculated as ~120px. Also update test to match maxItems default value (100).
This commit is contained in:
@@ -90,7 +90,7 @@ describe('AutoComplete widget interactions', () => {
|
||||
await vi.runAllTimersAsync();
|
||||
await Promise.resolve();
|
||||
|
||||
expect(fetchApiMock).toHaveBeenCalledWith('/lm/loras/relative-paths?search=example&limit=20');
|
||||
expect(fetchApiMock).toHaveBeenCalledWith('/lm/loras/relative-paths?search=example&limit=100');
|
||||
const items = autoComplete.dropdown.querySelectorAll('.comfy-autocomplete-item');
|
||||
expect(items).toHaveLength(1);
|
||||
expect(autoComplete.dropdown.style.display).toBe('block');
|
||||
|
||||
Reference in New Issue
Block a user