Welcome and thank you for your interest in contributing to our project!. You must use this template to submit a Pull Request, or it will not be accepted.
Motivation
[ ] Bug fix
[ ] Enhancement
[X] New feature
[ ] Breaking change
Description
This Pull Request adds the possibility to customize the no-data message ("No records found") individually in each component.
Individualized messages can be useful when having multiple PowerGrid components on the same page, and they also to provide more contextualized messages to users.
Usage:
The user may override the method noDataLabel() returning his own message.
use Illuminate\View\View;
class DishTable extends PowerGridComponent
{
//...
public function noDataLabel(): string|View
{
return 'We could not find any dish matching your search.';
}
}
For the user's convenience, the method may also return a View.
use Illuminate\View\View;
class DishTable extends PowerGridComponent
{
//...
public function noDataLabel(): string|View
{
return view('dishes.no-data');
}
}
I will provide a PR in PowerGrid's documentation once the implementation is approved.
⚡ PowerGrid - Pull Request
Welcome and thank you for your interest in contributing to our project!. You must use this template to submit a Pull Request, or it will not be accepted.
Motivation
Description
This Pull Request adds the possibility to customize the no-data message ("No records found") individually in each component.
Individualized messages can be useful when having multiple PowerGrid components on the same page, and they also to provide more contextualized messages to users.
Usage:
The user may override the method
noDataLabel()
returning his own message.For the user's convenience, the method may also return a
View
.I will provide a PR in PowerGrid's documentation once the implementation is approved.
Related Issue(s): #_____.
Documentation
This PR requires Documentation update?