I've got a popover on my layout used to add line items to my invoices, which works great.
I've now built a search into this, which you type in, and it then finds any products that contain the word in the 'search' field, which also works.
However, I now want to be able to sort by category and sub-category as a dropdown, and also be able to search. But not have to select a category if you don't want to. (I haven't added the subcategory yet, but have a field for it in the products table)
At the moment it auto selects the first category in the list, and then you can add keywords. How do I change this so it doesn't auto-select a category? (Bearing in mind that some products don't have a category, in which case they are shown when you empty the category search field in the layout) I suppose it almost needs an 'all category' option which is chosen by default? Not sure how to achieve this though.
I've included some screenshots of the layout and the current 'portal filter' calculation.