MarketTypeInput (src/market/type/MarketTypeInput.vue) hand-rolls its own autocomplete dropdown — useVirtualList, moveUp/moveDown, currentIndex highlight, click-outside, enter-to-select. That behavior is now encapsulated in the shared generic SelectInput<T> (src/components/SelectInput.vue), already used by MarketLocationInput.
Proposed change
Rebuild MarketTypeInput on top of SelectInput, using its input and item slots.
Drive suggestions from searchMarketTypes (debounced), same as MarketLocationInput drives searchMarketLocations.
Drop the duplicated keyboard-nav / virtual-list / click-outside code.
Acceptance criteria
MarketTypeInput renders via SelectInput.
Arrow up/down, Enter-to-select, click-outside and the type icon still work.
npm run build passes.
Related
Pairs with the "fix item select not working" issue (the suggestions.length > 1 bug), and the ledger-input refactor.
## Summary
`MarketTypeInput` (`src/market/type/MarketTypeInput.vue`) hand-rolls its own autocomplete dropdown — `useVirtualList`, `moveUp`/`moveDown`, `currentIndex` highlight, click-outside, enter-to-select. That behavior is now encapsulated in the shared generic `SelectInput<T>` (`src/components/SelectInput.vue`), already used by `MarketLocationInput`.
## Proposed change
- Rebuild `MarketTypeInput` on top of `SelectInput`, using its `input` and `item` slots.
- Drive suggestions from `searchMarketTypes` (debounced), same as `MarketLocationInput` drives `searchMarketLocations`.
- Drop the duplicated keyboard-nav / virtual-list / click-outside code.
## Acceptance criteria
- [ ] `MarketTypeInput` renders via `SelectInput`.
- [ ] Arrow up/down, Enter-to-select, click-outside and the type icon still work.
- [ ] `npm run build` passes.
## Related
Pairs with the "fix item select not working" issue (the `suggestions.length > 1` bug), and the ledger-input refactor.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
MarketTypeInput(src/market/type/MarketTypeInput.vue) hand-rolls its own autocomplete dropdown —useVirtualList,moveUp/moveDown,currentIndexhighlight, click-outside, enter-to-select. That behavior is now encapsulated in the shared genericSelectInput<T>(src/components/SelectInput.vue), already used byMarketLocationInput.Proposed change
MarketTypeInputon top ofSelectInput, using itsinputanditemslots.searchMarketTypes(debounced), same asMarketLocationInputdrivessearchMarketLocations.Acceptance criteria
MarketTypeInputrenders viaSelectInput.npm run buildpasses.Related
Pairs with the "fix item select not working" issue (the
suggestions.length > 1bug), and the ledger-input refactor.