TP-40576 add prefix text support in money format input transformation (#181)
This commit is contained in:
@@ -78,7 +78,8 @@ data class OutlinedTextFieldValueTransformation(
|
||||
val type: String? = null,
|
||||
val formatPattern: String? = null,
|
||||
val currentDateFormat: String? = null,
|
||||
val targetDateFormat: String? = null
|
||||
val targetDateFormat: String? = null,
|
||||
val prefixText: String? = null
|
||||
)
|
||||
|
||||
data class TextFieldIconData(val leadingIcon: UiTronView, val trailingIcon: UiTronView)
|
||||
|
||||
@@ -338,7 +338,11 @@ fun getTransformedText(
|
||||
inputText,
|
||||
valueTransformation.formatPattern
|
||||
)
|
||||
InputTransformationType.MONEY_WITH_RUPEE_SYMBOL.name -> moneyFormat(inputText).let { "₹ $it" }
|
||||
InputTransformationType.MONEY_WITH_RUPEE_SYMBOL.name -> moneyFormat(inputText).let { text ->
|
||||
valueTransformation.prefixText?.let { prefix ->
|
||||
"$prefix$text"
|
||||
} ?: "₹ $text"
|
||||
}
|
||||
else -> null
|
||||
}
|
||||
} ?: return null
|
||||
|
||||
Reference in New Issue
Block a user