after migration to 1.0.0-alpha1-rc1 a strange bug ...
# compose-desktop
v
after migration to 1.0.0-alpha1-rc1 a strange bug appeared First screenshot - 0.5.0-build270 Second screenshot - 1.0.0-alpha1-rc1
o
would
Modifier.fillMaxWidth()
help here?
v
not work, this is the first thing I tried
r
Could you please provide a simple reproducer? The code below works fine:
Copy code
fun main() = application {
    Window(
        onCloseRequest = ::exitApplication
    ) {
        val text = remember { mutableStateOf("") }
        TextField(
            value = text.value,
            singleLine = true,
            onValueChange = { text.value = it },
            modifier = Modifier.fillMaxWidth()
        )
    }
}
o
Copy code
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.material.OutlinedTextField
import androidx.compose.material.TextField
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application

fun main() = application {
    Window(
        onCloseRequest = ::exitApplication
    ) {
        Column {
            val text = remember { mutableStateOf("") }
            TextField(
                value = text.value,
                singleLine = true,
                onValueChange = { text.value = it },
                modifier = Modifier.fillMaxWidth()
            )
            OutlinedTextField(
                value = text.value,
                singleLine = true,
                onValueChange = { text.value = it },
                modifier = Modifier.fillMaxWidth()
            )
        }
    }
}
v
Copy code
fun main() = application {

    Window(
        onCloseRequest = ::exitApplication
    ) {
        Column {
            val text = remember { mutableStateOf("") }
            TextField(
                value = text.value,
                singleLine = true,
                onValueChange = { text.value = it },
                modifier = Modifier.fillMaxWidth(),
                trailingIcon = {
                    Icon(<http://Icons.Default.Info|Icons.Default.Info>, "")
                }
            )
        }
    }
}
Fixed after update to v1.0.0-alpha1-rc3
🎉 1