LocationBar

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

currentResults

: the available location items to display before/after search.

mode

: the initial mode for the composable.

searchAction

: How the search result selection is carried out.

searching

: whether the search is currently in progress.

onBackClicked

: callback for when the back button is clicked.

onClearLocation

: callback for when the clear location button is clicked.

onSearchLocation

: callback for when the search location button is clicked.

onLocationSelected

: callback for when a location item is selected.

onModeChanged

: optional callback for when the mode is changed.