In this example, We will perform Search and Sort Operation on Table.
We will be following below steps for Search -
- 1. Create Search Field on Table in View file.
- 2. Define Search Field Logic in Controller file.
Step 1 - Create Search Field on Table in View file
In View.xml on Table, create OverflowToolbar for the SearchField.
Refer the below code -
Step 2 - Define Search Field Logic in Controller file
In the Controller.js file and add the onSearch method on it.
And Search Field and Login is done !!!
Sort Functionality
We will be following below steps for Sort -
- 1. Create Sort Field on Table in View file.
- 2. Define Sort Field Logic in Controller file.
Step 1 - Create Sort Field on Table in View file
In View.xml on Table, create OverflowToolbar for the Sort.
Refer the below code -
Define Sort Field Logic in Controller file
Here is how our View.xml file looks like.
Here is how our Controller.js file looks like.