Created
June 8, 2022 10:29
-
-
Save simonbbyrne/fb89539fef438a65b335eaafc9b10092 to your computer and use it in GitHub Desktop.
Select2 no results template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### _____ | |
| _ \(_)___ _ __ | | __ _ _ _ | |
| | | | / __| _ \| |/ _ | | | | | |
| |_| | \__ \ |_) | | (_| | |_| | | |
|____/|_|___/ .__/|_|\__,_|\__, | | |
|_| |___/ | |
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ### | |
NoResultsTemplate: => | |
return $(' | |
<div class="empty-state" style="text-align:center;"> | |
<img src="image.svg"/> | |
<p>You have no task list templates</p> | |
<a href="#">Create template</a> | |
</div> | |
') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select class="form-control" data-bind="select2: { | |
placeholder: 'Select a template', | |
minimumResultsForSearch: 20, | |
width: '100%', | |
language: { | |
noResults: NoResultsTemplate | |
} | |
}"> | |
</select> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment