diff --git a/app/Http/Controllers/EntityController.php b/app/Http/Controllers/EntityController.php index c4cf6cbbc..7ce64d1fe 100644 --- a/app/Http/Controllers/EntityController.php +++ b/app/Http/Controllers/EntityController.php @@ -233,6 +233,17 @@ public function getData($id, $aid = null) { } $a->name = $names; break; + case 'table': + // Adds a unique key for the request by using the timestamp and the row number. + $rows = json_decode($a->json_val); + for($i = 0; $i < count($rows); $i++) { + $newRow = $rows[$i]; + + $newRow->index = time() . "-" . ($i + 1); + $rows[$i] = $newRow; + } + $a->json_val = json_encode($rows); + break; default: break; } diff --git a/resources/js/components/attribute/Tabular.vue b/resources/js/components/attribute/Tabular.vue index 840ff1527..46cba881b 100644 --- a/resources/js/components/attribute/Tabular.vue +++ b/resources/js/components/attribute/Tabular.vue @@ -38,7 +38,7 @@