JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
16.15k stars 1.17k forks source link

Web Canvas - NotImplementedError: AnnotatedString.transform #3139

Closed eygraber closed 1 year ago

eygraber commented 1 year ago

Describe the bug

When running my code in the browser, I get the following error:

"NotImplementedError: An operation is not implemented: implement native AnnotatedString.transform
    at transform (webpack-internal:///./kotlin/androidx-ui-text.js:15977:11)
    at toUpperCase (webpack-internal:///./kotlin/androidx-ui-text.js:1720:12)
    at sam$androidx_compose_ui_text_input_VisualTransformation$0.hexVisualTransformation$lambda [as function_1] (webpack-internal:///./kotlin/ht-material-shared.js:19048:33)
    at protoOf.filter_mummpk_k$ (webpack-internal:///./kotlin/ht-material-shared.js:19005:17)
    at filterWithValidation (webpack-internal:///./kotlin/androidx-foundation.js:28621:34)
    at CoreTextField$composable (webpack-internal:///./kotlin/androidx-foundation.js:21895:27)
    at BasicTextField$composable (webpack-internal:///./kotlin/androidx-foundation.js:20337:7)
    at eval (webpack-internal:///./kotlin/androidx-material3.js:19966:9)
    at protoOf.invoke_6harzl_k$ (webpack-internal:///./kotlin/androidx-runtime.js:35481:92)
    at eval (webpack-internal:///./kotlin/androidx-material3.js:19982:25)"

Affected platforms Select one of the platforms below:

Versions

MatkovIvan commented 1 year ago

Hi @eygraber,

I implemented it recently in https://github.com/JetBrains/compose-multiplatform-core/pull/523 So, it should be already available in last dev build.

Closing it, but don't hesitate to reopen if you're still facing with this or have more questions.

eygraber commented 1 year ago

Thank you, tested in 1.5.0-dev1043 and it works!

okushnikov commented 3 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.