-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flowbite interactivity not working with Blazor 8 #49
Comments
It's worth checking if this is a .net 8 issue or if it was preexisting. Whenever I've worked with Flowbite in Blazor, I implemented the interactive logic myself in C# because the old JavaScript framework wasn't Blazor friendly. |
That's what I m doing now. For the moment, a good result with modal compo based on the new html dialog and 2 lines of JS. I just begin with the inputs form integration and I suffer a little bit more with validation an stuff. ;) As a "back-end guy", definitly loving flowbite theme and all the stuff. The modal, for the fun below (microsoft style => open to the right for Add/Edit Form):
And the js:
|
Flowbite has been a game changer for my UIs. Similar to you, I prefer the backend more. Pleased to hear that. I haven't upgraded any of my projects yet. |
NOTE, the AfterRender() is only for called Interactive components. If you are using just Static SSR, then this is no bueno. I hope to make a fork of this repo to shows examples of all 4 render modes.
For 2 thru 4, I recommend creating a FlowBiteComponentBase.cs class the overrides the For 1. It's trickier as you must wait to call the flowbit.init() until after the stream rendering is complete and the DOM is fully available. |
Is there a fix to this, even using PageScript still doesn't work and @schaveyt, I tried your example, still doesn't work as well. |
@Akinnagbe r u dealing with the issue around SSR? |
@schaveyt I have the issue with SSR where flowbite.init() is called to early. do you have an idea how to get it working? EDIT: Okay solved it. I had to call flowbite.init() in OnAfterRenderAsync. |
As I said right here, to make it work with .NET 8 Blazor WASM, I had to use this:
Caution: At this time, I do not now if it is good practice! |
Following this : https://flowbite.com/docs/getting-started/blazor/
All the flowbite specific things are not working in term of interactivitywith blazor 8
The dropdown example doesn't work.
The dropdown style applied seems not correct and the interactivity (onclick) is not working.
To Reproduce
Follow the configuration on the site on a fresh Blazor 8 project.
Expected behavior
Interactivity working
The text was updated successfully, but these errors were encountered: