Container View
Learn how to build a modal view for lookup tables and get introduced to a field-based sorting mechanism.
We'll cover the following
Introduction
The lookup tables in our SQLite database are used to ensure consistency of the data that is entered in some of the fields in the Books table. These end up being foreign keys in the Books table, and we can use the records in these tables to populate lists in dropdown select boxes in our UI.
To view and eventually edit the data in these database lookup tables, we will look at a generic view component that can be used for all of the tables rather than creating a view component that is specific to just one of them.
About our application
In this application, we have a list of lookup tables that contains the name of the table, the fields to display, and the field name that sorts the table by table name. Then, we have the getItems()
function, which will pull the list of records from a required lookup table and sort it based on the sort field.
This is what the application looks like:
Note: To login use the username
admin
and password123
.
Get hands-on with 1400+ tech skills courses.