Skip to content

Conversation

@aerni
Copy link
Owner

@aerni aerni commented Mar 1, 2025

Using the assets field in a wizard form lead to some unexpected behavior, as noted in #86. This PR combats that issue by bundling the Filepond styles and providing a new @formAssets blade directive to simply include all scripts and styles in one go. Make sure to update your views to benefit from this.

In your form view, e.g. default.blade.php:

- @assets
-     <script type="module" src="/vendor/livewire-forms/js/livewire-forms.js"></script>
- @endassets

+ @formAssets

In your assets field view, e.g. /default/fields/assets.blade.php:

- @assets
-     <link href="https://unpkg.com/filepond@^4/dist/filepond.css" rel="stylesheet" />
-     <link href="https://unpkg.com/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.css" rel="stylesheet" />
- @endassets

@aerni aerni merged commit eeb013a into main Mar 1, 2025
17 checks passed
@aerni aerni deleted the fix/filepond-wizard branch March 1, 2025 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants