setting searchParams when selecting symptom or vaccine
This commit is contained in:
@@ -14324,7 +14324,6 @@
|
||||
var a2a_config = a2a_config || {};
|
||||
a2a_config.callbacks = a2a_config.callbacks || [];
|
||||
a2a_config.callbacks.push({
|
||||
// FK-TODO: use selected symptom and vaccine for url
|
||||
share: _ => ({ url: window.location.href }),
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -11,7 +11,12 @@ class PageInitializer {
|
||||
{
|
||||
selectElement: symptomSelectElement,
|
||||
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
|
||||
});
|
||||
}
|
||||
@@ -22,7 +27,12 @@ class PageInitializer {
|
||||
{
|
||||
selectElement: vaccineSelectElement,
|
||||
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
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user