Skip to content

Instantly share code, notes, and snippets.

@edgarMejia
Created April 12, 2019 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edgarMejia/36ba9bfa316e0e6ad2f8de738037622e to your computer and use it in GitHub Desktop.
Save edgarMejia/36ba9bfa316e0e6ad2f8de738037622e to your computer and use it in GitHub Desktop.
$('#selUser').select2('readonly', true); // DESHABILITANDO UN SELECT2
// PASANDO UNA LISTA A UN SELECT2
var ids = tableDetail.column(0).data().toArray();
initAsyncSelect2('selUser', CONSTANTS.routes.users.list, CONSTANTS.lang.users.rolePlaceholder,false, function () {
return { idUsersWithRoles: JSON.stringify(ids) }; // getting the id's
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment