Skip to content
Snippets Groups Projects

Draft: feat: replace select2 with accessible selectize

Closed Jonáš Herec requested to merge feat-accesibility into main
Files
3
<script>
django.jQuery(function () {
django.jQuery("select.address").each(function () {
const select = django.jQuery(this);
$(document).ready(function () {
$("select.address").each(function () {
const select = $(this);
const defaultValue = select.data("selectize-default-value");
const option = new Option(defaultValue, defaultValue, true, true);
select.append(option);
});
const apiKey = django.jQuery("select.address").data("selectize-api-key");
const categories = django.jQuery("select.address").data("selectize-filter-categories");
const apiKey = $("select.address").data("selectize-api-key");
const categories = $("select.address").data("selectize-filter-categories");
django.jQuery("select.address").selectize({
$("select.address").selectize({
create: false,
persist: false,
openOnFocus: true,
@@ -27,7 +27,7 @@
token: apiKey,
f: "json",
};
django.jQuery.ajax({
$.ajax({
url: "https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/suggest",
dataType: "json",
data: data,
Loading