Skip to content

Releases: wire-elements/modal

2.0.2-beta

30 Jul 21:25
Compare
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
Compare
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
Compare
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

1.0.8

07 Apr 12:37
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 1.0.7...1.0.8

1.0.7

07 Jul 11:22
8daf260
Compare
Choose a tag to compare

What's Changed

  • fixes loading speed issue by moving config reads away from View composer ... by @arukompas in #239

New Contributors

Full Changelog: 1.0.6...1.0.7

1.0.6

13 Apr 09:09
Compare
Choose a tag to compare

What's Changed

  • Add id to modal container by @ryangjchandler in #198
  • Fix bug that would cause dozens of requests when pressing escape

New Contributors

Full Changelog: 1.0.5...1.0.6

1.0.5

03 Mar 17:16
Compare
Choose a tag to compare

What's Changed

  • Gate instead of Guard facade to authorize actions by @olivsinz in #149
  • Fix flickering modal with Alpine 3.9.1 by @PhiloNL in #193

If you published modal.blade.php you will need to replace x-on:close.stop="show = false" with x-on:close.stop="setShowPropertyTo(false)" (see diff)

New Contributors

Full Changelog: 1.0.4...1.0.5

1.0.4

18 Jan 11:14
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 1.0.3...1.0.4

1.0.3

05 Nov 12:50
b3e08a9
Compare
Choose a tag to compare

What's Changed

New Contributors

  • @wit3 made their first contribution in #101

Full Changelog: 1.0.2...1.0.3

1.0.2

30 Oct 13:50
dd9beb7
Compare
Choose a tag to compare
Update README.md