process/configurator: fix irr-addon reset loading indication
This commit is contained in:
parent
7a00478727
commit
6b7c679a0d
@ -32,28 +32,33 @@ export default function valuesReactions({ store, apolloClient, trpcClient }: Pro
|
||||
]),
|
||||
async (values) => {
|
||||
$calculation.element('selectTarif').resetOptions().resetValue();
|
||||
try {
|
||||
if (abortController) abortController.abort();
|
||||
abortController = new AbortController();
|
||||
|
||||
if (abortController) abortController.abort();
|
||||
abortController = new AbortController();
|
||||
|
||||
setTimeout(() => {
|
||||
$process.add('Tarif');
|
||||
});
|
||||
|
||||
try {
|
||||
const { evo_tarif } = await trpcClient.getTarif.query(values, {
|
||||
signal: abortController.signal,
|
||||
});
|
||||
|
||||
if (evo_tarif) {
|
||||
$calculation.element('selectTarif').setOptions(normalizeOptions([evo_tarif]));
|
||||
$calculation.element('selectTarif').setValue(evo_tarif.evo_tarifid);
|
||||
$calculation
|
||||
.element('selectTarif')
|
||||
.setOptions(normalizeOptions([evo_tarif]))
|
||||
.setValue(evo_tarif.evo_tarifid);
|
||||
}
|
||||
|
||||
$process.delete('Tarif');
|
||||
} catch {
|
||||
$process.delete('Tarif');
|
||||
$calculation.element('selectTarif').resetOptions();
|
||||
} finally {
|
||||
$process.delete('Tarif');
|
||||
}
|
||||
},
|
||||
{
|
||||
delay: 10,
|
||||
delay: 50,
|
||||
equals: comparer.shallow,
|
||||
fireImmediately: true,
|
||||
wait: 100,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user