setting searchParams when selecting symptom or vaccine
This commit is contained in:
@@ -14324,7 +14324,6 @@
|
|||||||
var a2a_config = a2a_config || {};
|
var a2a_config = a2a_config || {};
|
||||||
a2a_config.callbacks = a2a_config.callbacks || [];
|
a2a_config.callbacks = a2a_config.callbacks || [];
|
||||||
a2a_config.callbacks.push({
|
a2a_config.callbacks.push({
|
||||||
// FK-TODO: use selected symptom and vaccine for url
|
|
||||||
share: _ => ({ url: window.location.href }),
|
share: _ => ({ url: window.location.href }),
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -11,7 +11,12 @@ class PageInitializer {
|
|||||||
{
|
{
|
||||||
selectElement: symptomSelectElement,
|
selectElement: symptomSelectElement,
|
||||||
textOfOption2Select: selectSymptom,
|
textOfOption2Select: selectSymptom,
|
||||||
onValueSelected: (id, text) => prrByVaccineTableView.displayPrrByVaccineTable4Symptom(id, text),
|
onValueSelected: (id, text) => {
|
||||||
|
prrByVaccineTableView.displayPrrByVaccineTable4Symptom(id, text);
|
||||||
|
const url = new URL(window.location.href);
|
||||||
|
url.searchParams.set('symptom', text);
|
||||||
|
window.history.replaceState(null, "", url);
|
||||||
|
},
|
||||||
minimumInputLength: 0
|
minimumInputLength: 0
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -22,7 +27,12 @@ class PageInitializer {
|
|||||||
{
|
{
|
||||||
selectElement: vaccineSelectElement,
|
selectElement: vaccineSelectElement,
|
||||||
textOfOption2Select: selectVaccine,
|
textOfOption2Select: selectVaccine,
|
||||||
onValueSelected: (id, text) => prrBySymptomTableView.displayPrrBySymptomTable4Vaccine(id, text),
|
onValueSelected: (id, text) => {
|
||||||
|
prrBySymptomTableView.displayPrrBySymptomTable4Vaccine(id, text);
|
||||||
|
const url = new URL(window.location.href);
|
||||||
|
url.searchParams.set('vaccine', text);
|
||||||
|
window.history.replaceState(null, "", url);
|
||||||
|
},
|
||||||
minimumInputLength: 0
|
minimumInputLength: 0
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user