SearchBar

fun SearchBar(text: String = "", placeHolderText: String = provideStringResource("search"), onActiveChange: (Boolean) -> Unit = {}, onSearch: (String) -> Unit = {}, onQueryChange: (String) -> Unit = {}, state: InputShellState = InputShellState.FOCUSED, modifier: Modifier = Modifier, leadingIcon: @Composable () -> Unit? = null, focusRequester: FocusRequester = remember { FocusRequester() })

DHIS2 Search bar.

Parameters

text

: the label to display.

placeHolderText

: the placeholder to display.

onActiveChange

: callback to when value is modified.

onSearch

: on search callback.

onQueryChange

: on query change callback.

state

: input shell state.

modifier

: optional modifier.

leadingIcon

: optional leading icon to display.

focusRequester

: optional focus requester.