Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

Commit

Permalink
Use x-ref instead of an id to allow multiple color pickers to co-exist
Browse files Browse the repository at this point in the history
  • Loading branch information
RVxLab committed Mar 18, 2022
1 parent d9a2fdc commit 994ea2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/views/colorpicker.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
init() {
$nextTick(() => {
this.picker = window.FilamentColorPicker.make($wire, {
parent: document.getElementById('filament-color-picker'),
parent: $refs.colorPicker,
...@js($getPickerOptions()),
});
});
},
}"
>
<div
id="filament-color-picker"
x-ref="colorPicker"
class="color-picker flex flex-wrap mt-1 shadow-sm"
>
@includeWhen($getPreview(), 'filament-colorpicker::preview')
Expand Down

0 comments on commit 994ea2c

Please sign in to comment.