fabulous-dev / Fabulous

Declarative UI framework for cross-platform mobile & desktop apps, using MVU and F# functional programming
https://fabulous.dev
Apache License 2.0
1.13k stars 122 forks source link

Maui SearchBar changes #995

Closed edgarfgp closed 1 year ago

edgarfgp commented 1 year ago
TimLariviere commented 1 year ago

I'm noticing we let people set the cursor position and selection length but they can't listen for the user changing the cursor or the selection. This is a problem since Fabulous will override whatever the user is doing on each update.

Would be nice to make those modifiers both setter and event listener like the text/textChanged modifier.

static member inline cursorPosition(position: int, onPositionChanged: int -> 'msg)

This is true for Entry, Editor and SearchBar. It's also true for Fabulous.XamarinForms (I even think CursorPosition and SelectionLength are missing in Fabulous.XF for Editor and SearchBar)