PowerGrid Action Buttons Showing as "undefined" #1923
Unanswered
ByounghoPark
asked this question in
Q&A
Replies: 1 comment
-
I have this same problem - the second render (after selecting a filter or something) the actions start showing |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
PowerGrid Action Buttons Showing as "undefined"
Hello everyone,
I'm encountering an issue where the action buttons in my PowerGrid table are not rendering correctly
and instead display as "undefined". The rest of the data grid seems to be working fine.
I've also tried running
npm run build
and clearing my browser cache, but the problem persists.Has anyone else experienced this or have any suggestions on how to resolve it?
Here's the relevant code from my Livewire component (
FarmersTable.php
):public function columns(): array
{
return [
Column::make('Id', 'id'),
Column::make('Name', 'name')->sortable()->searchable(),
// ... other columns ...
Column::action('Action')
];
}
public function actions(Farmer $row): array
{
return [
Button::add('edit')
->slot('Edit: '.$row->id)
->id()
->class('pg-btn-white dark:ring-pg-primary-600 dark:border-pg-primary-600 dark:hover:bg-pg-primary-700 dark:ring-offset-pg-primary-800 dark:text-pg-primary-300 dark:bg-pg-primary-700')
->dispatch('edit', ['rowId' => $row->id])
];
}
And my resources/js/app.js currently looks like this:
import './bootstrap';
import './../../vendor/power-components/livewire-powergrid/dist/powergrid';
And my resources/css/app.css currently looks like this:
@import 'tailwindcss';
@import '../../vendor/power-components/livewire-powergrid/resources/css/tailwind4.css';
/** enable dark mode */
@custom-variant dark (&:where(.dark, .dark *));
@source '../views';
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/.blade.php';
@source '../../storage/framework/views/.php';
@source '..//*.blade.php';
@source '..//*.js';
@source '../../app/Livewire/Table.php';
@source '../../app/Livewire//*Table.php';
@source '../../vendor/power-components/livewire-powergrid/src/Themes/Tailwind.php';
@source '../../vendor/power-components/livewire-powergrid/resources/views//.php';
@theme {
--font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
'Segoe UI Symbol', 'Noto Color Emoji';
}
Beta Was this translation helpful? Give feedback.
All reactions