Skip to content

Commit

Permalink
Expose ellipsize in Kotlin TextInput wrapper
Browse files Browse the repository at this point in the history
Summary: As per title - TextInputSpec has ellipsize prop but it was never exposed in TextInput kotlin wrapper.

Reviewed By: pentiumao

Differential Revision: D67130920

fbshipit-source-id: 2eaa6a240234e6bea90f9fdc9e8fec1f3c2f2a8d
  • Loading branch information
zielinskimz authored and facebook-github-bot committed Dec 12, 2024
1 parent c5691d2 commit 249159c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import android.graphics.Color
import android.graphics.Typeface
import android.graphics.drawable.Drawable
import android.text.InputFilter
import android.text.TextUtils.TruncateAt
import android.text.TextWatcher
import android.view.Gravity
import android.view.View
Expand Down Expand Up @@ -64,6 +65,7 @@ inline fun ResourcesScope.TextInput(
imeOptions: Int = EditorInfo.IME_NULL,
inputFilter: InputFilter? = null,
inputFilters: List<InputFilter>? = null,
ellipsize: TruncateAt? = null,
/** Called when the text entered by the user changes. */
noinline onTextChanged: ((TextChangedEvent) -> Unit)? = null,
/** Called when the selection (particular case: cursor position) gets changed by user. */
Expand Down Expand Up @@ -114,5 +116,6 @@ inline fun ResourcesScope.TextInput(
onKeyPreIme?.let { keyPreImeEventHandler(eventHandlerWithReturn(it)) }
onEditorAction?.let { editorActionEventHandler(eventHandlerWithReturn(it)) }
onInputConnection?.let { inputConnectionEventHandler(eventHandlerWithReturn(it)) }
ellipsize?.let { ellipsize(it) }
}
.build()

0 comments on commit 249159c

Please sign in to comment.