From 2e927ec05a9ae303e4db01139afb5c5ec0dc88f5 Mon Sep 17 00:00:00 2001 From: Siddharth Agarwal Date: Mon, 16 Oct 2023 13:58:47 +0530 Subject: [PATCH] remove click on disabled state --- .../mobile/ui/designsystem/component/InputDropDown.kt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/designsystem/src/commonMain/kotlin/org/hisp/dhis/mobile/ui/designsystem/component/InputDropDown.kt b/designsystem/src/commonMain/kotlin/org/hisp/dhis/mobile/ui/designsystem/component/InputDropDown.kt index a4a09029e..417c2c356 100644 --- a/designsystem/src/commonMain/kotlin/org/hisp/dhis/mobile/ui/designsystem/component/InputDropDown.kt +++ b/designsystem/src/commonMain/kotlin/org/hisp/dhis/mobile/ui/designsystem/component/InputDropDown.kt @@ -89,10 +89,13 @@ fun InputDropDown( modifier = Modifier .matchParentSize() .alpha(0f) - .clickable(onClick = { - focusRequester.requestFocus() - onArrowDropDownButtonClicked.invoke() - }), + .clickable( + enabled = state != InputShellState.DISABLED, + onClick = { + focusRequester.requestFocus() + onArrowDropDownButtonClicked.invoke() + }, + ), ) } },