Sha256: 147bc71b4a08af577c598784aef3d7f979b80da292c2d02f4dac5c80f9389bc2
Contents?: true
Size: 468 Bytes
Versions: 4
Compression:
Stored size: 468 Bytes
Contents
/** * OPTIONAL (SELECT2 PLUGIN) */ export default function () { setupSelect2('.select2-item') } export function setupSelect2(target) { $(target).each(function() { let placeholder = $(this).attr('placeholder') if ( typeof placeholder == 'undefined' ) { placeholder = 'Select a option' } $(this).select2({ minimumResultsForSearch: 32, // 31 are max number of day in a month, which you don't want to be searchable placeholder: placeholder }) }) }
Version data entries
4 entries across 4 versions & 1 rubygems