12 - Enable App to Filter Products
Add UI components and logic to enable filtering of the product list, as part of the SAP Build CodeJam.
You will learn
- How to the filter a repeated component using the Visible property
Daniel WroblewskiMay 13, 2024
Prerequisites
- You have completed the previous tutorial for the SAP Build CodeJam, Enable App to Select Product by Scanning Barcode.
The very first thing you did in this CodeJam was to create a product page listing products from the ES5 backend.
But will want to be able to filter the list, and you will create 2 filters:
-
Free text search, using an input field. The app will then show any product whose name or description contains the string.
-
By category, using a dropdown field. The app will contain a dropdown of valid categories, and the user can select one; the app then displays only products in that category.
Note that this type of filtering is done in the app, after all data has been retrieved. There are other ways to filter the data on the server, generally using the OData filtering capabilities. That is beyond the scope of this tutorial.