diff options
author | Mateja <mail@matejamaric.com> | 2021-03-20 22:47:33 +0100 |
---|---|---|
committer | Mateja <mail@matejamaric.com> | 2021-03-20 22:47:33 +0100 |
commit | 09ee04d39911f169457567c869d732a11387651a (patch) | |
tree | 864455da40f7572ce5aa243803ea7afd15ff66a7 /resources | |
parent | 5a30e103893c05d138a80ed18d65a948aea973e6 (diff) | |
download | yota-laravel-09ee04d39911f169457567c869d732a11387651a.tar.gz yota-laravel-09ee04d39911f169457567c869d732a11387651a.zip |
Use Lodash cloneDeep for `reservation.vue` component.
Diffstat (limited to 'resources')
-rw-r--r-- | resources/js/components/reservation.vue | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/resources/js/components/reservation.vue b/resources/js/components/reservation.vue index d733c9d..5389e1a 100644 --- a/resources/js/components/reservation.vue +++ b/resources/js/components/reservation.vue @@ -25,15 +25,18 @@ export default { props: [ 'reservationIndex' ], data() { return { - reservation: this.$store.getters.getData[this.reservationIndex] + reservation: {} } }, + mounted() { + this.reservation = _.cloneDeep(this.$store.getters.getData[this.reservationIndex]); + }, methods: { updateRow() { }, restoreRow() { - + this.reservation = _.cloneDeep(this.$store.getters.getData[this.reservationIndex]); }, deleteRow() { |