Giter VIP home page Giter VIP logo

Comments (10)

MichaelCereda avatar MichaelCereda commented on August 10, 2024

Yes, from 0.9 to give more flexibility i removed the standard Separator that was inside Form.
Just add a Separator inside your form and pass the text to the label prop.

Thank you for using my library

from react-native-form-generator.

abellee avatar abellee commented on August 10, 2024

Actually, You've done a great work!! I should thank you to save my time.
and another problem is if I use the KeyboardAwareScrollView,
the Simulator will shows me an error:
image
Am I doing anything wrong?
and code is just:

import React, { Component } from 'react';

import {
    View,
    Text,
    ScrollView
} from 'react-native';

import {
    Form,
    Separator,
    InputField,
    KeyboardAwareScrollView
} from "react-native-form-generator";

class ShirtOrder extends Component {

    state={
        formData: {}
    }

    render(){
        return (
            <KeyboardAwareScrollView
                ref="scroll"
            >

            </KeyboardAwareScrollView>
        );
    }
}
export default ShirtOrder;

from react-native-form-generator.

MichaelCereda avatar MichaelCereda commented on August 10, 2024

yes.. that because KeyboardAwareScrollView is not exported anymore
you can try to access it directly.
try something like

import {
    KeyboardAwareScrollView
} from "react-native-form-generator/src/KeyboardAwareScrollView";

or copy it from the repo.

from react-native-form-generator.

abellee avatar abellee commented on August 10, 2024

also not working but import it from react-native-keyboard-aware-scroll-view.

from react-native-form-generator.

MichaelCereda avatar MichaelCereda commented on August 10, 2024

yes you can also use that, but i highly encourage you to create your own solution using the official ScrollView

from react-native-form-generator.

abellee avatar abellee commented on August 10, 2024

If I clicked the InputField, error happened
image

maybe just like you said, I need to do it myself.

from react-native-form-generator.

MichaelCereda avatar MichaelCereda commented on August 10, 2024

can you post a code sample, that error means nothing, it's just the event that is triggered by the focusaction

from react-native-form-generator.

abellee avatar abellee commented on August 10, 2024
import React, { Component } from 'react';

import {
    View,
    Text,
    ScrollView
} from 'react-native';

import {
    Form,
    Separator,
    InputField,
} from "react-native-form-generator";

import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'

class ShirtOrder extends Component {

    state={
        formData: {}
    }

    handleFormFocus(event, reactNode){
       this.refs.scroll.scrollToFocusedInput(event, reactNode)
    }

    handleFormChange(formData){

    }

    render(){
        return (
            <KeyboardAwareScrollView
                ref="scroll"
            >
                <Form
                    ref="shirtOrder"
                    onFocus={ this.handleFormFocus.bind(this)}
                    onChange={this.handleFormChange.bind(this)}
                >
                    <InputField
                        ref="ordernumnow"
                        label="orderNum" />

                </Form>
            </KeyboardAwareScrollView>
        );
    }
}
export default ShirtOrder;

from react-native-form-generator.

abellee avatar abellee commented on August 10, 2024

I found what's with this,
I've forgot to remove the code in handleFormFocus

from react-native-form-generator.

MichaelCereda avatar MichaelCereda commented on August 10, 2024

;) if you want post a screenshot of your final form in action, i would love
to see it.
Have a nice day.

On Thu, Jul 7, 2016 at 5:56 PM abellee [email protected] wrote:

I found what's with this,
I've forgot to remove the code in handleFormFocus


You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub
#22 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAGjfgKm8LRREQB6oZJu3w1R6hUAC1TJks5qTSG_gaJpZM4JHJF7
.

Michael Cereda
http://michaelcereda.com

from react-native-form-generator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.