dokar3 / ChipTextField

Editable chip layout for Compose Multiplatform
Apache License 2.0
91 stars 4 forks source link

OutlinedChipTextField auto can't be removed- when using in a form #74

Closed ashishkr2534 closed 1 year ago

ashishkr2534 commented 1 year ago

i am using this libarary and to get chips in outlined textfields . (OutlinedChipTextFiled) while using this with other compose outlined TextFields it get the focus when navigation to that form screen.

Trying to stop that from happening. as my top field are getting scrolled to bottom and get focused on OutlinedChipTextField().

Any Help/support/feedback on this -

dokar3 commented 1 year ago

Thank you for reporting, it seems a bug while I was trying to deal with the focus between chips and the text field, should be fixed soon after dispatching a fix.

ashishkr2534 commented 1 year ago

@dokar3 Is there any work around- around this, or i can somehow disable focus at initial call.

One more thing , i was trying to populate chips by passing array list from api but seems complex to do so with chip state.

dokar3 commented 1 year ago

@dokar3 Is there any work around- around this, or i can somehow disable focus at initial call.

There will be a fix soon, for now, I think the only way to prevent it to be focused is passing a non-empty initial chip list to the rememberChipTextFieldState()

One more thing , i was trying to populate chips by passing array list from api but seems complex to do so with chip state.

You can set the initial chips by passing it to rememberChipTextFieldState(), or call addChip()/removeChip() from the chip state.

ashishkr2534 commented 1 year ago

Thank You @dokar3 Really Appreciate it....

dokar3 commented 1 year ago

@ashishkr2534 You are welcome, feel free to report.

dokar3 commented 1 year ago

v0.4.6 is out, the issue should be fixed, you can try it to verify, feel free to report if it's not.

ashishkr2534 commented 1 year ago

Thank You @dokar3 . Latest update ( V0.4.6 ) did solved my auto focus issue. really Appreciate it : )

/// Will also use prePopulatio on chip with list.

dokar3 commented 1 year ago

You are welcome, happy to hear it's been solved.