Form/PaymentsTable: optimize inputs
This commit is contained in:
parent
5bba693751
commit
1442f96f12
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user