0
votes

I'm using a FilteringSelect that use an FilteringSelect as store.

I want to ignore the accented characters that users can enter, and to return all the elements with or without accents. But i don't know what event i have to catch.

Here's my code :

  var ccppMemory = new dojo.store.FilteringSelect({
    data: centrosPoblado,  
    idProperty: "id"
  });

  sboMunicipio = new dijit.form.FilteringSelect({
        id: "soMunicipioSelect",
        hasDownArrow: false,          
        placeholder: i18n.tools.searches.ordinary.departmentTown,
        store: ccppMemory,
        searchAttr: "unitario",
        intermediateChanges : true,        
        queryExpr: "*${0}*",
        autoComplete: false,
        highlightMatch: "all",
      style:"margin-right:5px;width:170px;"
  }, "soMunicipioSelect");
  sboMunicipio.startup(); 

To explain better, centrosPoblado is an array that i populate as :

  centrosPoblado.push({
    id: value.attributes.CODIGO_DANE,
    label: value.attributes.NOMBRE_CENTRO_POBLADO,
    unitario: value.attributes.DEPTO + " / " + value.attributes.NOMBRE_CENTRO_POBLADO
  });

In 'unitario' i have store strings like 'Medellín', ' Bogotá', ....

What i want is that when a user enter medellín, the filterselect ignore and returns 'Medellín' . So what i think i have to do it's to substitute medellin for something like m[eé]d[eé]ll[íi]n, but i don't know where.

Thanks

1

1 Answers

0
votes

if anyone is interested, here is the answer :

http://dojo-toolkit.33424.n3.nabble.com/FilteringSelect-avoid-Accented-characters-td4004099.html

You have to overwrite the 'queryEngine' of the Memory that its linked to the FilteringSelect