blade-ui-kit icon indicating copy to clipboard operation
blade-ui-kit copied to clipboard

Initiate FlatPickr component on page load instead of mouse-enter

Open koenhendriks opened this issue 1 year ago • 2 comments

Currently the flatpickr component only get loaded when a mouse hovers the input. When using this with an empty value this doesn't have any issues. But when you're on the edit page of a traditional CRUD design you will first see an unformatted default HTML input and it 'jumps' to a different format when hovering. See the attached video for an example.

https://github.com/blade-ui-kit/blade-ui-kit/assets/4124579/beb53b78-1efb-4ecf-ac58-18b44c918c05

By replacing the mouse-enter with x-init and nextTick we ensure that the flatpickr components get loaded after Alpine has completely finished rendering .

This way when a value is set for the flatpickr it will be initiated correctly with this format.

koenhendriks avatar May 11 '23 12:05 koenhendriks

Can someone take a look at this @caneco @driesvints or @nuernbergerA ?

koenhendriks avatar Sep 22 '23 15:09 koenhendriks

Is this project no longer maintained ? @caneco @driesvints or @nuernbergerA ?

koenhendriks avatar Jan 06 '24 08:01 koenhendriks

Thanks. I'm sorry it took this long.

driesvints avatar Mar 27 '24 10:03 driesvints