Form/PaymentsTable: optimize inputs

This commit is contained in:
Chika 2022-07-06 20:49:46 +03:00
parent 5bba693751
commit 1442f96f12

View File

@ -1,9 +1,10 @@
import { computed } from 'mobx';
import { useStore } from 'stores/hooks';
export function useRowValue(index) {
const { $tables } = useStore();
const storeValue = $tables.payments.getValue(index);
const storeValue = computed(() => $tables.payments.getValue(index)).get();
function setStoreValue(value) {
$tables.payments.setValue(index, value);
@ -15,7 +16,7 @@ export function useRowValue(index) {
export function useRowStatus(index) {
const { $tables } = useStore();
const status = $tables.payments.getStatus(index);
const status = computed(() => $tables.payments.getStatus(index)).get();
return status;
}