add keys to list items.

This commit is contained in:
ammarahm-ed
2020-01-11 13:42:10 +05:00
parent 473cb91807
commit acb89d4a61

View File

@@ -276,6 +276,7 @@ export const ActionSheetComponent = ({
rowItems.includes(rowItem.name) ? ( rowItems.includes(rowItem.name) ? (
<TouchableOpacity <TouchableOpacity
onPress={rowItem.func} onPress={rowItem.func}
key={rowItem.name}
style={{ style={{
alignItems: 'center', alignItems: 'center',
width: (w - 24) / rowItems.length, width: (w - 24) / rowItems.length,
@@ -322,6 +323,7 @@ export const ActionSheetComponent = ({
{['red', 'yellow', 'green', 'blue', 'purple', 'orange', 'gray'].map( {['red', 'yellow', 'green', 'blue', 'purple', 'orange', 'gray'].map(
color => ( color => (
<TouchableOpacity <TouchableOpacity
key={color}
onPress={() => { onPress={() => {
let noteColors = note.colors; let noteColors = note.colors;
@@ -379,6 +381,7 @@ export const ActionSheetComponent = ({
}}> }}>
{note.tags.map(tag => ( {note.tags.map(tag => (
<TouchableOpacity <TouchableOpacity
key={tag}
onPress={() => { onPress={() => {
let oldProps = {...note}; let oldProps = {...note};
@@ -452,6 +455,7 @@ export const ActionSheetComponent = ({
{columnItemsData.map(item => {columnItemsData.map(item =>
columnItems.includes(item.name) ? ( columnItems.includes(item.name) ? (
<TouchableOpacity <TouchableOpacity
key={item.name}
activeOpacity={opacity} activeOpacity={opacity}
onPress={() => { onPress={() => {
item.func(); item.func();