Compose Modifier

filterTextContextMenuComponents

Adds a [filter] to be run when the text context menu is shown within this hierarchy.

AddFilterToTextContextMenu

@Composable
fun AddFilterToTextContextMenu() {
    val textFieldState = rememberTextFieldState()
    BasicTextField(
        state = textFieldState,
        modifier =
            Modifier.filterTextContextMenuComponents(
                filter = { component -> component.key === ClearKeyDataObject }
            ),
    )
}