/
default-w-search-dd.jigx
42 lines (35 loc) · 1.3 KB
/
default-w-search-dd.jigx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
title: Search List (Dynamic)
description: A dynamic list displaying search functionality
type: jig.default
icon: notes-paper-approve
header:
type: component.jig-header
options:
height: medium
children:
type: component.image
options:
source:
uri: https://images.unsplash.com/photo-1529220502050-f15e570c634e?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1829&q=80
datasources:
cleaning-services-dynamic:
type: datasource.sqlite
options:
provider: DATA_PROVIDER_DYNAMIC
entities:
- entity: default/cleaning-services
query: SELECT id, '$.area', '$.description', '$.hourlyrate', '$.illustration', '$.image', '$.indoor', '$.onceoffrate', '$.service', '$.time' FROM [default/cleaning-services] WHERE '$.service' LIKE '%'||@search||'%' OR @search IS NULL
queryParameters:
search: =@ctx.components.cleaning_serv_items.state.searchText
children:
- type: component.list
instanceId: cleaning_serv_items
options:
data: =@ctx.datasources.cleaning-services-dynamic
isSearchable: true
maximumItemsToRender: 50
item:
type: component.list-item
options:
title: =@ctx.current.item.service
subtitle: =@ctx.current.item.area