Value slider Double range

I retrieve the values ​​of my slide by javascript, to put them in the text fields input1 and input2, which serves as a filter for my query, unfortunately when I change the values, and the values ​​change in input 1 and 2 the query is not updated, I also tried by putting dmx-changed, but that does nothing either

do you have an idea, or a slide that would work with wappler

{F5488BB3-3EA3-4538-BA6F-BDB9CBDD0422}

Thanks

Hey Morgan

I suppose you have a serverconnect with get variables that modify your query's results...

Have you set your serverconnect's input parameters equal to the inputs values?

I suggest you also add a delay (debounce) on your inputs change events so they do not trigger the servervonnect load to many times as you change them (sliding the slider)

<dmx-serverconnect id="scListe" url="../dmxConnect/api/Admin/Projets/Liste/ListeFiltree.php" dmx-param:recherche="recherche.value" dmx-param:sort="query.sort" dmx-param:dir="query.dir" dmx-param:referent="referent.selectedValue" dmx-param:montantmin="input1.value" dmx-param:montantmax="input2.value" dmx-param:publicprive="type.value" dmx-param:etat="etat.selectedValue" dmx-param:mandataire="mandataire.selectedValue" dmx-param:pole="pole.selectedValue" dmx-param:moa="moa.selectedValue" dmx-param:competence="competence.selectedValue" dmx-param:mission="mission.selectedValue" dmx-param:type="type.selectedValue" dmx-param:surfaceupmin="surfaceupmin.value" dmx-param:surfaceupmax="surfaceupmax.value" dmx-param:surfaceopmin="surfaceopmin.value" dmx-param:surfaceopmax="surfaceopmax.value" dmx-param:surfaceppmin="surfaceppmin.value" dmx-param:surfaceppmax="surfaceppmax.value" dmx-param:departement="departement.selectedValue" dmx-param:region="region.selectedValue" dmx-param:agence="agence.selectedValue"></dmx-serverconnect>

i'll try

1 Like

I can't check now.. On mobile.

But better chevk:

  1. the inputs also have id input1 & input2
  2. how you named them on your page and how you get them in your api. Are you handling the correct values

it works when i enter a value in input1 or input2 but not when i use the slide, even if the slide changes my value in the inputs

So you must set the dmx.value of the inputs=slider.value

Have you?

Or add a dynamic on change event on the sliders to pass their values to the inputs
(also with a debounce...)

Then the only thing that i can think is to check if the $_GET names of the inputs in your api are correct..
Check them on your dev concole

1 Like

by passing the values ​​through GET it works thank you

1 Like