TimLariviere / Fabulous-new

Fabulous v2 - Work in progress
https://timothelariviere.com/Fabulous-new/
Other
41 stars 3 forks source link

TabbedPage + Extensions #121

Closed edgarfgp closed 2 years ago

edgarfgp commented 2 years ago

This PR add extension methods for TabbedPage https://docs.microsoft.com/en-us/dotnet/api/xamarin.forms.tabbedpage?view=xamarin-forms Screenshot 2022-03-16 at 12 22 51

https://user-images.githubusercontent.com/31915729/158589227-77dc414b-c0f1-443b-9e98-e2752cddfa3c.mp4

This is throwing an Exception on Android . But works on IOS . So I think the might be an issue on the ViewNode

    let CurrentPageChanged =
        Attributes.defineEventNoArg
            "MultiPageOfPage_CurrentPageChanged"
            (fun target -> (target :?> MultiPage<Page>).CurrentPageChanged)

droid-crash-logs.txt

TimLariviere commented 2 years ago

I fixed the issue on Android.

The Android renderer for TabbedPage triggers a CurrentPageChanged immediately on creation, except Fabulous is still creating the initial view so not ready to update it.

I disabled all dispatch before Fabulous is ready to process messages.