Skip to content

Releases: wire-elements/modal

2.0.9

08 Dec 09:32

Choose a tag to compare

  • Fix event duplication when using wire:navigate

2.0.8

12 Nov 14:57

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 2.0.7...2.0.8

2.0.7

08 Sep 20:16
0f64fc4

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 2.0.6...2.0.7

2.0.6

06 Sep 19:35
d2fb82e

Choose a tag to compare

  • Stable release

2.0.5-beta

16 Aug 10:00
beee4d2

Choose a tag to compare

2.0.5-beta Pre-release
Pre-release

What's Changed

Full Changelog: 2.0.4-beta...2.0.5-beta

2.0.4-beta

31 Jul 12:21

Choose a tag to compare

2.0.4-beta Pre-release
Pre-release
Fix tests

2.0.3-beta

30 Jul 21:32

Choose a tag to compare

2.0.3-beta Pre-release
Pre-release
  • Rename the config file, make sure to republish and update your config:
php artisan vendor:publish --tag=wire-elements-modal-config

2.0.2-beta

30 Jul 21:25

Choose a tag to compare

2.0.2-beta Pre-release
Pre-release
  • Update upgrade command

You can automate the required changes using the following command:

php artisan livewire:upgrade --run-only wire-elements-modal-upgrade

2.0.1-beta

30 Jul 21:23

Choose a tag to compare

2.0.1-beta Pre-release
Pre-release
  • The old component name is being deprecated. Replace @livewire('livewire-ui-modal') with @livewire('wire-elements-modal')
  • arguments is the named property to pass arguments to your modal, for example:
$dispatch('openModal', {component: 'edit-user', arguments: {user: 5}})

Beta release for Livewire v3

25 Jul 19:23

Choose a tag to compare

Pre-release

Livewire v3 now expects named arguments; this means you will have to adjust your events.

<-- Before -->
<button wire:click="$emit('openModal', 'users')">Show Users</button>
<!-- After -->
<button wire:click="$dispatch('openModal', {component: 'users'})">Show Users</button>

<-- Before -->
<button wire:click="$emit('openModal', 'edit-user', {user: 5})">Edit User</button>
<!-- After -->
<button wire:click="$dispatch('openModal', {component: 'edit-user', arguments: {user: 5}})">Edit User</button>

You can use regular expression to automate this change:

// Regular Expression
emit\('openModal', '([^']+)'(?:, (\{[^}]+\}|@js\(\[[^\]]+\]\)))?\)

// Example 1
$emit('openModal', 'edit-user', {user: 5})

// Matches
$0 = emit('openModal', 'edit-user', {user: 5})
$1 = edit-user
$2 = {user: 5}

// Example 2
$emit('openModal', 'edit-user', @js(['foo' => 'bar']))

// Matches
$0 = emit('openModal', 'edit-user', @js(['foo' => 'bar']))
$1 = edit-user
$2 = @js(['foo' => 'bar'])

// Update all occurrences
dispatch('openModal', {component: '$1', arguments: $2});

In PHPStorm:
image