configurator/reactions: reset selectTarif before call getTarif query
This commit is contained in:
parent
70d5386b15
commit
8c47d5f2e2
@ -30,13 +30,13 @@ export default function valuesReactions({ store, apolloClient, trpcClient }: Pro
|
||||
'partialVAT',
|
||||
]),
|
||||
async (values) => {
|
||||
$calculation.element('selectTarif').resetOptions().resetValue();
|
||||
|
||||
const { evo_tarif } = await trpcClient.getTarif.query(values);
|
||||
|
||||
if (evo_tarif) {
|
||||
$calculation.element('selectTarif').setOptions(normalizeOptions([evo_tarif]));
|
||||
$calculation.element('selectTarif').setValue(evo_tarif.evo_tarifid);
|
||||
} else {
|
||||
$calculation.element('selectTarif').resetOptions();
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user