質問編集履歴
1
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -67,6 +67,19 @@
|
|
67
67
|
1: { sample_id: 1, sample_labels: 'Spanish', sample_data: 50 }
|
68
68
|
2: { sample_id: 2, sample_labels: 'French', sample_data: 50 }
|
69
69
|
```
|
70
|
+
|
71
|
+
試したこと
|
72
|
+
```
|
73
|
+
if ( key == sample_labels ) {
|
74
|
+
let addValue = { sample_id: id, sample_labels: newValue }
|
75
|
+
}
|
76
|
+
if ( key == sample_data ) {
|
77
|
+
let addValue = { sample_id: id, sample_data: newValue }
|
78
|
+
}
|
79
|
+
items.map(item => (item.sample_id === id ? setState(addValue) : item))
|
80
|
+
```
|
81
|
+
これでは保存されないです
|
82
|
+
|
70
83
|
お心優しい方アドバイスいただきたいです
|
71
84
|
|
72
85
|
よろしくおねがいします。
|