Livewire 3 #1072
Replies: 5 comments 9 replies
-
Researching performance issue: livewire/livewire#6052 |
Beta Was this translation helpful? Give feedback.
-
Some breakpoints for the new version with livewire 3 and improvements:
// v4
public function actions(): array
{
}
public function actionsRules(): array
{
}
// v5
public function actions(Dish $dish): array
{
}
public function actionsRules(Dish $dish): array
{
}
## old
Button::add('create-dish')
->caption('Create a dish')
->class('bg-indigo-500 text-white')
->emit('postAdded', ['key' => 'id']), // deprecated
## new
Button::add('create-dish')
->caption('Create a dish')
->class('bg-indigo-500 text-white')
->dispatch('postAdded', ['key' =>$row->id]), // <-----------------
Column::make('Created At', 'created_at_formatted'),
Column::action('Action'), // <-----------------
];
}
Macros added/**
* @method static dispatch(string $event, array $params)
* @method static dispatchTo(string $component, string $event, array $params)
* @method static dispatchSelf(string $event, array $params)
* @method static openModal(string $component, array $params)
* @method static parent(string $method, array $params)
* @method static call(string $method, array $params)
* @method static toggleDetail()
* @method static tooltip(string $title)
* @method static route(string $route, array $params)
* @method static method(string $method)
* @method static target(string $target) _blank, _self, _top, _parent, null
* @method static render(\Closure $closure)
* @method static bladeComponent(string $component, array $params)
*
*/ |
Beta Was this translation helpful? Give feedback.
-
I made a nice improvement here that will be available in this version
public function summarizeFormat(): array
{
return [
'price' => function ($value) {
return (new \NumberFormatter('en_US', \NumberFormatter::CURRENCY))
->formatCurrency($value, 'USD');
}
];
}
public function columns()
{
return [
Column::make('Price', 'price')
->withSum('Sum Price', true, false)
->withCount('Count Price', true, false)
->withAvg('Avg Price', true, false)
->sortable(),
];
} |
Beta Was this translation helpful? Give feedback.
-
Added filterRelation - 2778bd1 public function filters(): array
{
return [
Filter::inputText('category_name')
->filterRelation('category', 'name')
];
} |
Beta Was this translation helpful? Give feedback.
-
Hey everyone! I released a pre-release and by making final adjustments we can launch the official soon. https://github.com/Power-Components/livewire-powergrid/releases/tag/v5.0.0-beta How to launch faster? Thanks |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
WIP
Beta Was this translation helpful? Give feedback.
All reactions