Skip to content

Commit

Permalink
customSelected slot bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
victorybiz committed Aug 11, 2021
1 parent d417028 commit e4a2035
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

All notable changes to `laravel-simple-select` will be documented in this file

## v1.2.3 - 2021-08-11

- `customSelected` Slot Bug fix.

## v1.2.2 - 2021-08-04

- Popper positioning bug fix

## v1.2.1 - 2021-07-26

- wire:model and popper bug fix.

## v1.2.0 - 2021-06-26

- Added `customSelected` Slot.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Alpine.start()

window.createPopper = createPopper;
```
If you’re not using a compiled JavaScript, don’t forget to include CDN versions of the JavaScript Dependencies before it.
If you’re using the compiled JavaScript, don’t forget to include CDN versions of the JavaScript Dependencies before it.

<a name="usage"></a>

Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/simple-select.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class="w-6"
<div class="w-full px-2 truncate">
@isset($customSelected)
<span x-data="{ option: getOptionFromSelectedValue(selected) }">
<template x-if="(typeof option === 'string' && option.length > 0) || (typeof option === 'object' && Object.keys(option).length > 0)">
<template x-if="option !== null && ((typeof option === 'string' && option.length > 0) || (typeof option === 'object' && Object.keys(option).length > 0))">
<span>{{ $customSelected }}</span>
</template>
</span>
Expand Down
3 changes: 2 additions & 1 deletion src/SimpleSelectServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public function boot()
// Registering package commands.
// $this->commands([]);
}


// Registering the blade components.
Blade::component(config('simple-select.component-name', 'simple-select'), SimpleSelect::class);
}

Expand Down

0 comments on commit e4a2035

Please sign in to comment.