The user should be able to:
- Only select ONE Category
- Select multiple Subcategories
Idea (A):
- Use autocomplete select dropdown so user can search through both Categories and Subcategories
- Close matches, whether it be a Category or Subcategory, will get surfaced in the search results
- The advantage of this is if the user is unfamiliar with the Categories/Subcategories, then they can just easily search through the list:
- Once the user has selected a Category/Subcategory, their selections get surfaced on the field as chips (we'd like to ideally be able to leverage the MUI Autocomplete component that uses autocomplete and chips:
Questions:
- In the mockup above, after making a selection, the query the user typed in is not cleared until they explicitly do this (by backspacing). But should it be cleared as soon as they make a selection?
- Once the user selects a Category, since they must only select one, should other Categories not be shown anymore (the chips UI might suggest that multiple Categories are allowed)?
- Once the user selects a Category, should the rest of its child Subcategories appear automatically, effectively auto-clearing the user's search query?
Idea (B):
- Display a single Category field:
- Allow the user to search through both Categories and Subcategories, but they should only be able to select one - either a Category or Subcategory:
- If the user happens to select a Subcategory first, a Subcategory field will appear into place which will automatically be pre-filled with the user's initial selection. The user can choose to add more Subcategories if they wish to:
Questions:
- I think what bothers me here is that fields "automatically get split" into two which could be unconventional and jarring to the user. Am I wrong to think this way?