Skip to content

Commit cf4010d

Browse files
Fix tabs and spaces issues
1 parent 64bd659 commit cf4010d

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

tutorials/sapui5-webide-add-search-field/sapui5-webide-add-search-field.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,38 +29,38 @@ You will add a `<SearchField>` control to the initial page of the application. W
2929
<subHeader> <Bar> <contentLeft> <SearchField search="handleSearch" /> </contentLeft> </Bar> </subHeader>
3030
```
3131

32-
![Adding a subHeader element](1a.png)
32+
![Adding a subHeader element](1a.png)
3333

34-
You will also need to add an ID field to the `<List>` element, directly below. Add this to the `<List>` element:
35-
36-
37-
```
38-
id="List"
39-
```
40-
41-
![Adding an id tag to the List element](1b.png)
34+
You will also need to add an ID field to the `<List>` element, directly below. Add this to the `<List>` element:
35+
36+
37+
```
38+
id="List"
39+
```
40+
41+
![Adding an id tag to the List element](1b.png)
4242

4343
2. Open the `webapp/view/View1.controller.js` file, and update the Controller with the following new functionality:
4444

4545
>**Note** Be careful with the exact placement of this code. The code should go after a single closed braces `}`, on line 14.
4646

4747

48-
```javascript
48+
```javascript
4949
, handleSearch : function (evt) { // create model filter var filters = []; var query = evt.getParameter("query"); if (query && query.length > 0) { var filter = new sap.ui.model.Filter("ProductName", sap.ui.model.FilterOperator.Contains, query); filters.push(filter); }
5050
// update list binding var list = this.getView().byId("List"); var binding = list.getBinding("items"); binding.filter(filters); }
51-
```
51+
```
5252

53-
![Add the handleSearch method to the controller](2.png)
53+
![Add the handleSearch method to the controller](2.png)
5454

5555
3. Run your application. You should see the search box at the top of the list, right below the words `Product Overview`.
5656

57-
> **NOTE**: If the search does not work, check the `View1.view.xml` file, and make sure the `<List>` element has an *id* parameter.
57+
> **NOTE**: If the search does not work, check the `View1.view.xml` file, and make sure the `<List>` element has an *id* parameter.
5858

59-
![Search field is displayed](3.png)
59+
![Search field is displayed](3.png)
6060

6161

6262
## Next Steps
63-
- The next tutorial in the series is Part 10: [Add an Order Activity to the form](https://go.sap.com/developer/tutorials/sapui5-webide-add-order-activity.html)
63+
- The next tutorial in the series is Part 10: [Add an Order Activity to the form](https://go.sap.com/developer/tutorials/sapui5-webide-add-order-activity.html)
6464

6565
## Additional Information
6666
- [`<SearchField>` element](https://sapui5.hana.ondemand.com/explored.html#/entity/sap.m.SearchField/samples)

0 commit comments

Comments
 (0)