Posts

Showing posts with the label datatable

$(…).DataTable is not a function when using Laravel Mix

$(…).DataTable is not a function when using Laravel Mix I struggle using Laravel Mix and DataTables. The issue I have is that when I compile down my .js-files etc., each time I would then visit a page that would execute a jQuery datatable, the follwoing error is thrown: The error is: jQuery.Deferred exception: $(...).DataTable is not a function TypeError: $(...).DataTable is not a function Uncaught TypeError: $(...).DataTable is not a function From what I understand, $(...).DataTable is not a global variable, but how can I make sure that it is accessible "on a global scope" / within my app? $(...).DataTable The following is my setup: app.js import jquery from 'jquery/dist/jquery.slim' import 'bootstrap-sass' import 'datatables.net'; import dt from 'datatables.net-bs'; window.$ = window.jQuery = jquery; webpack.mix.js mix .js('resources/assets/admin/js/app.js', 'js/') .extract([ 'jquery', 'bootstrap-s...

DataTable search not working for dynamic rows

Image
DataTable search not working for dynamic rows I have following table #physician-privellages on which I have implemented DataTable . #physician-privellages DataTable .table table.table.table-striped#physician-privellages thead tr th First Name th Last Name th Email th Patient Privileges th Visit Privileges - if Authorizer.physician_practice? th My Practice th Actions tbody.privileged-physician-records - user_permissions_for_physicians = physician_privileges_permissions(user_id) - user_permissions_for_physician = user_permissions_for_physicians[user_id] - user_permissions_for_physician&.delete(user_id) - user_permissions_for_physician&.each do |user_id, user_permissions| tr td = "#{user_permissions[:physician].first_name}" td = "#{user_permissions[:physician].last_name}" td = "...