Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add optional scout js script #210

Merged
merged 2 commits into from
Nov 3, 2023
Merged

feat: Add optional scout js script #210

merged 2 commits into from
Nov 3, 2023

Conversation

frknakk
Copy link
Contributor

@frknakk frknakk commented Oct 27, 2023

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');
}

Copy link
Owner

@yajra yajra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like your idea on addScipt 🎉

  • Minor change to adapt the configurable namespace
  • Can we also include the scripts on the editor template

src/resources/views/scout.blade.php Outdated Show resolved Hide resolved
Co-authored-by: Arjay Angeles <aqangeles@gmail.com>
Copy link

sonarcloud bot commented Nov 3, 2023

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
Copy link
Contributor Author

frknakk commented Nov 3, 2023

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
Copy link
Owner

yajra commented Nov 3, 2023

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
Copy link
Owner

yajra commented Nov 3, 2023

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

@yajra yajra changed the title Optional scout js script feat: Add optional scout js script Nov 3, 2023
@yajra yajra merged commit 4b49e86 into yajra:master Nov 3, 2023
5 checks passed
@yajra
Copy link
Owner

yajra commented Nov 4, 2023

Released on v10.10.0 🚀 Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants