Replies: 2 comments 5 replies
-
Feel free to PR The function that gets the function name from |
Beta Was this translation helpful? Give feedback.
4 replies
-
This seems like the best solution: import { AlpineComponent } from '@leanadmin/alpine-typescript';
window.Alpine.onBeforeComponentInitialized(component => {
if (! component.$el.hasAttribute('x-title')) {
if (component.$data.constructor.prototype instanceof AlpineComponent) {
component.$el.setAttribute('x-title', component.$data.constructor.name);
}
}
}); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have some components that look like this:
alpinejs-devtools renders it like this:
Also this:
is rendered as
Alpine.component
Is there some behavior for only looking at the last
()
? I think I can solve this on my end but maybe this could be an issue for some other components too. Wondering what's the rationale behind the different display name here.Thanks
Beta Was this translation helpful? Give feedback.
All reactions