Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- updateSelectizeOptions = (selectize) ->
- currentValue = selectize.getValue()
- options = getOptionsForColumn(selectize.$input.data('column'))
- options.push(currentValue)
- clearSelectizeOptions(selectize)
- fillSelectizeWithOptions(selectize, options)
- selectize.setValue(currentValue, true)
- getOptionsForColumn = (column) =>
- table = $('#changelog-report-table').DataTable()
- dropdown_data = jQuery.unique(table.column(column).data()).sort()
- clearSelectizeOptions = (selectize) =>
- selectize.options = selectize.sifter.items = {}
- selectize.clear(true)
- fillSelectizeWithOptions = (selectize, options) =>
- for value in options
- selectize.addOption({ 'value': value })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement