Revert change on AutoFillNode.

This commit is contained in:
Thomas Andres Gomez 2022-10-21 17:57:17 +02:00
parent c9049be239
commit 76d3e64f41
2 changed files with 6 additions and 11 deletions

View file

@ -31,7 +31,7 @@ class BooksViewModel @Inject constructor(
val updateError: Flow<BookUpdateErrorUio> get() = _updateError
init {
updateBooks()
// updateBooks()
}
fun updateBooks() {

View file

@ -1,6 +1,5 @@
package com.pixelized.biblib.utils.extention
import androidx.compose.runtime.remember
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.autofill.AutofillNode
@ -18,15 +17,11 @@ fun Modifier.autofill(
onFill: ((String) -> Unit),
) = composed {
val autofill = LocalAutofill.current
val autofillTree = LocalAutofillTree.current
val autofillNode = remember {
AutofillNode(
onFill = onFill,
autofillTypes = autofillTypes
).also {
autofillTree += it
}
}
val autofillNode = AutofillNode(
onFill = onFill,
autofillTypes = autofillTypes
)
LocalAutofillTree.current += autofillNode
return@composed this
.onGloballyPositioned {