From b418d31c998b9b400f333bb0925dbc6782316826 Mon Sep 17 00:00:00 2001 From: Chika Date: Wed, 6 Jul 2022 13:28:19 +0300 Subject: [PATCH] store/tables/insurance: add reset method --- stores/tables/insurance/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stores/tables/insurance/index.ts b/stores/tables/insurance/index.ts index c88ee7b..afd5704 100644 --- a/stores/tables/insurance/index.ts +++ b/stores/tables/insurance/index.ts @@ -76,4 +76,11 @@ export default class InsuranceTable { mergeWith(this.statuses[rowIndex], rowStatuses); } }; + + reset = () => { + this.values = insuranceTableConfig.defaultValues; + this.options = insuranceTableConfig.defaultOptions; + this.statuses = insuranceTableConfig.defaultStatuses; + this.validation.clearErrors(); + }; }