Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Tailwind Datatables Laravel Package

squipix/tailwind-datatables

View on GitHub
Deep Wiki
Context7
1.1.0

Security

  • XSS prevention: Added escHtml() helper function; all server-supplied values rendered into HTML (truncateText, statusBadge, image, actions, select_checkbox) are now HTML-escaped before insertion.
  • XSS prevention: row.id in the actions renderer is now validated as a safe integer (parseInt + NaN guard) before being embedded in Alpine directive strings.
  • XSS prevention: Replaced innerHTML assignment in openFormModal with DOMParser + replaceChildren() to prevent script injection via server-returned HTML.
  • CSRF safety: Replaced direct .getAttribute('content') calls on the CSRF meta tag with a getCsrfToken() helper that uses optional chaining (?.) to avoid TypeError when the tag is absent. Applied across all fetch() calls in crud-datatable.js and post-form.js.

Fixed

  • Duplicate Alpine component registration: Removed the redundant Alpine.data('postForm', postForm) call at the bottom of post-form.js; registration is performed once inside registerGorlabsDatatablesAlpineComponents.
  • Hardcoded /posts/ routes: The app Alpine component no longer constructs its own URLs or fires DELETE requests directly. It now delegates via submit-delete-item and open-edit-modal events, which crudDataTable handles using its configured updateUrlPrefix / deleteUrlPrefix.
  • Wrong this context in initComplete: $(this.api().table().node()) replaced with $(tableElement) (captured from outer scope) since this inside initComplete refers to the DataTables API, not the Alpine component.
  • Memory leaks — dangling event listeners: deleteItem and crudDataTable components now store handler references and expose destroy() methods calling removeEventListener, preventing listener accumulation on re-mount.
  • Dead Alpine v2 API calls: Removed discoverUninitializedComponents / initializeComponent calls from app.js; these methods do not exist in Alpine v3.
  • Dead Livewire v2 hooks: Removed livewire:load / Livewire.hook('message.processed', ...) block from app.js; replaced by Livewire v3 lifecycle in consuming applications.
  • Dead bodyUrl store field: Removed unused bodyUrl: '' property from the modalData Alpine store.
  • Null-safe dataTableInstance reload: Guard added before calling this.dataTableInstance.ajax.reload() in deleteItem.

Changed

  • Redundant import Alpine, import Swal, and import dayjs statements removed from post-form.js (these are already global from app.js).
  • Removed all informational console.log calls from crud-datatable.js and post-form.js; only console.error remains for genuine error paths.
1.0.0

Added

  • Initial release of Squipix Laravel Tailwind DataTables package.
  • Seamless integration of Yajra DataTables with Tailwind CSS and Alpine.js.
  • Customizable views, config, and assets.
  • Automatic Yajra DataTables HTML configuration (script and view paths).
  • Rich column customization options (date formatting, status badges, text truncation).
  • Comprehensive README.md with setup guides for Livewire and Vue.js stacks.
  • MIT License.
  • Initial CHANGELOG.md for version tracking.
  • Global Alpine.js components and SweetAlert2 integration for CRUD operations.

Changed

  • N/A (No changes, as this is the initial release)

Fixed

  • N/A (No fixes, as this is the initial release)

Removed

  • N/A (Nothing removed, as this is the initial release)
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky