Skip to content

Instantly share code, notes, and snippets.

@Balder1840
Last active September 28, 2018 05:14
Show Gist options
  • Save Balder1840/c542f60f1f47024049b5160712d95bb6 to your computer and use it in GitHub Desktop.
Save Balder1840/c542f60f1f47024049b5160712d95bb6 to your computer and use it in GitHub Desktop.
select2-readonly
//https://github.com/select2/select2/issues/3387#issuecomment-321820965
//For me worked what leonardofalk did but a little changed. My select2 Version is 4.03
select[readonly].select2-hidden-accessible + .select2-container {
pointer-events: none;
touch-action: none;
.select2-selection {
background: #eee;
box-shadow: none;
}
.select2-selection__arrow,
.select2-selection__clear {
display: none;
}
}
//I also used what transputec did to make a working example here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment