Location Bar
fun LocationBar(currentResults: List<LocationItemModel>, mode: SearchBarMode = SearchBarMode.BUTTON, searchAction: OnSearchAction = OnSearchAction.Default, searching: Boolean, onBackClicked: () -> Unit, onClearLocation: () -> Unit, onSearchLocation: (query: String) -> Unit, onLocationSelected: (LocationItemModel) -> Unit, onModeChanged: (currentMode: SearchBarMode) -> Unit = {})
DHIS2 Location Bar.
Parameters
current Results
: the available location items to display before/after search.
mode
: the initial mode for the composable.
search Action
: How the search result selection is carried out.
searching
: whether the search is currently in progress.
on Back Clicked
: callback for when the back button is clicked.
on Clear Location
: callback for when the clear location button is clicked.
on Search Location
: callback for when the search location button is clicked.
on Location Selected
: callback for when a location item is selected.
on Mode Changed
: optional callback for when the mode is changed.