This commit is contained in:
ammarahm-ed
2020-01-11 23:05:39 +05:00
parent ea94048294
commit 9e24f2b40e
2 changed files with 233 additions and 144 deletions

View File

@@ -1,4 +1,4 @@
import React, {useState} from 'react';
import React, {useState, useEffect} from 'react';
import {
View,
Text,
@@ -28,7 +28,7 @@ const h = Dimensions.get('window').height;
let tagsInputRef;
export const ActionSheetComponent = ({
close = () => {},
item = {},
item,
setWillRefresh = value => {},
hasColors = false,
hasTags = false,
@@ -39,6 +39,10 @@ export const ActionSheetComponent = ({
const [focused, setFocused] = useState(false);
const [note, setNote] = useState(item ? item : {});
useEffect(() => {
setNote({...item});
}, [item]);
let tagToAdd = null;
let backPressCount = 0;
@@ -257,6 +261,10 @@ export const ActionSheetComponent = ({
return (
<View
onLayout={() => {
console.log(item);
setNote({...item});
}}
style={{
paddingBottom: 15,
backgroundColor: colors.bg,