1
0
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:
Awilum
2020-02-29 11:20:51 +03:00
parent f817968d58
commit f5ee48655a

View File

@@ -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>