TP-75372 | Abhinav | added disable click support in customClickable (#568)
This commit is contained in:
@@ -58,7 +58,7 @@ open class BaseProperty(
|
||||
var animate: Animate? = null,
|
||||
var transformOrigin: TransFormOrigin? = null,
|
||||
var propertyAnimator: List<PropertyAnimator?>? = null,
|
||||
val disableClick: Boolean? = false
|
||||
var disableClick: Boolean? = false
|
||||
) : Parcelable {
|
||||
open fun copyNonNullFrom(property: BaseProperty?) {
|
||||
property?.width?.let { width = it }
|
||||
@@ -87,6 +87,7 @@ open class BaseProperty(
|
||||
property?.animate?.let { animate = it }
|
||||
property?.propertyAnimator?.let { propertyAnimator = it }
|
||||
property?.transformOrigin?.let { transformOrigin = it }
|
||||
property?.disableClick?.let { disableClick = it }
|
||||
}
|
||||
|
||||
fun getPropertyId() = layoutId + PROPERTY_SUFFIX
|
||||
|
||||
@@ -326,7 +326,7 @@ fun Modifier.customClickable(
|
||||
actions: List<UiTronAction?>? = null,
|
||||
property: BaseProperty? = null
|
||||
): Modifier = composed {
|
||||
if (!actions.isNullOrEmpty()) {
|
||||
if (!actions.isNullOrEmpty() && property?.disableClick.orFalse().not()) {
|
||||
if (property?.debounceTime != null && property.debounceTime.orZero() > 0) {
|
||||
val coroutineScope = rememberCoroutineScope()
|
||||
val clickEvents by remember { mutableStateOf(MutableSharedFlow<Unit>()) }
|
||||
|
||||
Reference in New Issue
Block a user