yajra / laravel-datatables-html

Laravel DataTables HTML Builder Plugin
https://yajrabox.com/docs/laravel-datatables/html-installation
MIT License
272 stars 63 forks source link

feat: Add optional scout js script #210

Closed frknakk closed 1 year ago

frknakk commented 1 year ago

See yajra/laravel-datatables#3082

Added general system to include additional js scripts to the initialization and added specific (optional) scout addition for abovementioned pull request.

Usage:

public function html(): HtmlBuilder
{
    return $this->builder()
        ->setTableId('products-table')
        ->addScript('datatables::scout');
}
sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

frknakk commented 1 year ago

Can we also include the scripts on the editor template

Do you mean include the same scripts a second time? If yes, why?

Or are you talking about the option to generally add scripts to editor template for future use cases?

yajra commented 1 year ago

I mean to include the @foreach(scripts) inside editor.blade.php. We heavily use the Editor library for CRUD and I think this is a great addition to add scripts on it. Thanks!

yajra commented 1 year ago

This is good to go, Editor support can be added on the next iteration.

yajra commented 1 year ago

Released on v10.10.0 🚀 Thanks!