Эх сурвалжийг харах

Feature: TextInput height problm fixed.

lfabl 3 сар өмнө
parent
commit
551c48e969

+ 4 - 1
example/src/index.tsx

@@ -33,7 +33,10 @@ const App = () => {
     >
         <Text>Result: </Text>
         <TextInput
-
+            title="Bi dene daha bombe."
+            initialValue="dsfsdfdsf"
+            hintText="asfasfasf"
+            isDisabled={false}
         />
         <Button
             onPress={() => {

+ 2 - 1
src/components/textInput/index.tsx

@@ -468,13 +468,14 @@ const TextInput: RefForwardingComponent<ITextInputRef, ITextInputProps> = ({
     };
 
     return <TouchableOpacity
+        disabled={isDisabled}
         style={[
             style,
             stylesheet.container,
             containerDynamicStyle
         ]}
         onPress={() => {
-            inputRef.current?.focus();
+            if(!isDisabled) inputRef.current?.focus();
         }}
     >
         {renderTitle()}

+ 1 - 0
src/components/textInput/stylesheet.ts

@@ -150,6 +150,7 @@ const stylesheet = StyleSheet.create({
     hintTextIcon: {
     },
     hintText: {
+        flexDirection: "row",
         alignItems: "center",
         display: "flex"
     },