-
I've been working on getting my colour picker package to work with Filament 2.x for the last couple of days but I'm currently stuck on getting my Blade component to make use of it. Taking inspiration of the DateTimePicker component I attempt to create a custom plugin that registers my plugin in Alpine.data as such: function colorPickerPlugin(Alpine) {
console.log(Alpine);
Alpine.data('rvxlabFilamentColorPickerComponent', () => ({
init() {
console.log('init');
},
}));
}
window.Alpine.plugin(colorPickerPlugin); In this case I do get the Alpine object printed to console, so the JS is running. However, Alpine does not seem to be able to find the Could anyone tell me what I'm doing wrong here? I just can't seem to figure it out. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
Hi, have you tried doing this in an external JS file? And then registering this in your plugin service provider? It may be a weird inconsistency between NPM & browser Alpine builds. |
Beta Was this translation helpful? Give feedback.
Hi, have you tried doing this in an external JS file? And then registering this in your plugin service provider? It may be a weird inconsistency between NPM & browser Alpine builds.