Sha256: 738498cbeaa457c16948d24b292c6686baf0c01bc7242efd4272875b101097db
Contents?: true
Size: 454 Bytes
Versions: 6
Compression:
Stored size: 454 Bytes
Contents
import { initSelect2 } from '../common/common.js'; $(document).on('turbolinks:load', () => { $('select.select2').each(function(_i, ele) { initSelect2(ele); }) }) $(document).on('turbolinks:before-cache', () => { $('select.select2').select2('destroy'); destroyDataTables(); }) function destroyDataTables() { let $dts = $('.dataTable'); if ($dts.length) { $dts.each(function(_i, dt) { $(dt).DataTable().destroy(); }) } }
Version data entries
6 entries across 6 versions & 1 rubygems