Last active
April 19, 2018 17:09
-
-
Save HaNdTriX/33c487b475af1b57838d to your computer and use it in GitHub Desktop.
Selectize Plugin to allow to set a maxlength
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Selectize.define('inputMaxlength', function(options) { | |
var self = this; | |
this.setup = (function() { | |
var original = self.setup; | |
return function() { | |
original.apply(this, arguments); | |
this.$control_input.attr('maxlength', this.settings.inputMaxlength); | |
}; | |
})(); | |
}); |
how do you install this plugin?
I tried adding a new folder under selectize>plugins>inputMaxLength
and dropping th efile there and renaming it plugin.js
I keep getting Unable to find "inputMaxlength" plugin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage