mirror of
https://github.com/flextype/flextype.git
synced 2025-08-14 17:14:22 +02:00
feat(admin-plugin): add ability to work with string field for select2
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
<script>
|
||||
$('.js-select').select2();
|
||||
$('.js-tags').select2({tags: true, multiple: true});
|
||||
</script>
|
||||
$('.js-tags').select2({tags: true, multiple: true, tokenSeparators: [',', ' ']});
|
||||
|
||||
$('.js-tags').on('change', function (e) {
|
||||
$('.js-tags').each(function() {
|
||||
var name = $(this).attr('data-name');
|
||||
$('input[name='+name+']').val($(this).val().toString());
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user