Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mpk123's avatar

async with watch function for scopeFilter

The watch function below filters prop.students. The function alphaLinks passes the prop.students. How do I make it so the function awaits and passes the filtered value. As it is now it passes the value before it's filtered.

I'm using composition API

watch( [search, serviceDate, currentGrade, currentHr, mealType], ([searchValue, serviceDateValue, currentGradeValue, currentHrValue, mealTypeValue])  => {
    Inertia.get('/pos', {search: searchValue, serviceDate: serviceDateValue, grade: currentGradeValue, hr: currentHrValue, mealType: mealTypeValue}, {
        preserveState: true,
    })
     alphaLinks(props.students);
});
0 likes
0 replies

Please or to participate in this conversation.