Skip to content

[2.x] Load modal slot on show#723

Merged
taylorotwell merged 1 commit intolaravel:2.xfrom
dillingham:patch-1
Mar 23, 2021
Merged

[2.x] Load modal slot on show#723
taylorotwell merged 1 commit intolaravel:2.xfrom
dillingham:patch-1

Conversation

@dillingham
Copy link
Contributor

@dillingham dillingham commented Mar 23, 2021

Problem:

Components within modals render when <jet-modal :show="false"> currently.

Effects:

  • modals with components that request data on mount.. fires on page load
  • modals with forms partially completed, closed, reopened.. not fresh form

Solution:

Adding v-if to the <slot> insures the the v-show still transitions but slot contents render each open

@driesvints
Copy link
Member

driesvints commented Mar 23, 2021

Does this also happens on the Livewire side of things?

@taylorotwell taylorotwell merged commit 7ddfc37 into laravel:2.x Mar 23, 2021
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.

3 participants