Git Product home page Git Product logo

react-native-progress-steps's People

Contributors

angelvenchev avatar colbymillerdev avatar curtismenmuir avatar dansmit avatar dependabot[bot] avatar nicwalle avatar ribonuclecode avatar sonquer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-native-progress-steps's Issues

send data between progress step views

I have used this component to only showing a few inputs on a screen at a time, now I want to send data between the step views and I don't want how to do it.

Can any one help me in this case ?

change current step

Hi, I call an axios request in the first step when I click next button and then the request returns a success response I change the errors props to false to pass to the next step but didn't work I need to click on it many times then it passes to the next.

How can I fix that?
thank you

FlatList into progressStep component

I have a problem when a use a flatlist in ProgressStep. I think this problem solve, if you use SafeAreaView instead of scrollView in ProgressStep.

I am use react-native 0.61.5.

ScrollView inside ProgressStep

I have a ScrollView inside the ProgressStep but I can't scroll to the bottom. I have tried all sorts of settings to the ScrollView. The Form has a TextInput that grows with content. The form looks fine and scrolls correctly outside of ProgressStep (Part of a Wizard and then can be modified outside wizard)

I see ScrollViewProps and wondering how to manage?

View instead of ScrollView in the progressStep

It can be useful to replace the scrollView (on demand) by a simple view.

Just adding a prop to enable/disable the scrollview (+ adding a viewProps) might solve the problem.

Working on it

Recommendation Pass Data from a Screen to another

Hello,
I need to pass data from a screen of the steppers to another.

As in React-native is not possible to pass data from child to parents.Is it possible to link the steppers with react-navigation.

 What are the recommendation to pass data from a Progress STep screen to another.

See my code:

`export default class SinisterSteps extends React.Component{

...
render(){

    return(
        <Block safe flex style={{ backgroundColor: theme.COLORS.WHITE }}>
            <ProgressSteps>
                <ProgressStep label="Categories"  onNext={() => this.nextStep} nextBtnDisabled={false} previousBtnDisabled={true}>
                
                    <SinisterCategoriesScreen/>

                </ProgressStep>
                <ProgressStep label="Photo">
                    
                    <SinisterPhotoScreen />
                
                </ProgressStep>
                <ProgressStep label="Dernier étape">
                    
                    <SinisterInfoScreen/>

                </ProgressStep>
            </ProgressSteps>    

        </Block>
                
        );

}

}
`

Invalid props.style key `textAlign` supplied to `View`

"react-native-progress-steps": "^1.2.9",Implementing errorWarning:

Failed prop type: Invalid props.style key textAlign supplied to View.Bad object: { "transitionProperty": "opacity", "transitionDuration": "0.15s", "userSelect": "none", "cursor": "pointer", "touchAction": "manipulation", "textAlign": "center", "padding": 8}Valid keys: [ "animationDelay", "animationDirection", "animationDuration", "animationFillMode", "animationIterationCount", "animationKeyframes", "animationPlayState", "animationTimingFunction", "transitionDelay", "transitionDuration", "transitionProperty", "transitionTimingFunction", "borderColor", "borderBottomColor", "borderEndColor", "borderLeftColor", "borderRightColor", "borderStartColor", "borderTopColor", "borderRadius", "borderBottomEndRadius", "borderBottomLeftRadius", "borderBottomRightRadius", "borderBottomStartRadius", "borderTopEndRadius", "borderTopLeftRadius", "borderTopRightRadius", "borderTopStartRadius", "borderStyle", "borderBottomStyle", "borderEndStyle", "borderLeftStyle", "borderRightStyle", "borderStartStyle", "borderTopStyle", "cursor", "touchAction", "userSelect", "willChange", "alignContent", "alignItems", "alignSelf", "backfaceVisibility", "borderWidth", "borderBottomWidth", "borderEndWidth", "borderLeftWidth", "borderRightWidth", "borderStartWidth", "borderTopWidth", "bottom", "boxSizing", "direction", "display", "end", "flex", "flexBasis", "flexDirection", "flexGrow", "flexShrink", "flexWrap", "height", "justifyContent", "left", "margin", "marginBottom", "marginHorizontal", "marginEnd", "marginLeft", "marginRight", "marginStart", "marginTop", "marginVertical", "maxHeight", "maxWidth", "minHeight", "minWidth", "order", "overflow", "overflowX", "overflowY", "padding", "paddingBottom", "paddingHorizontal", "paddingEnd", "paddingLeft", "paddingRight", "paddingStart", "paddingTop", "paddingVertical", "position", "right", "start", "top", "visibility", "width", "zIndex", "aspectRatio", "gridAutoColumns", "gridAutoFlow", "gridAutoRows", "gridColumnEnd", "gridColumnGap", "gridColumnStart", "gridRowEnd", "gridRowGap", "gridRowStart", "gridTemplateColumns", "gridTemplateRows", "gridTemplateAreas", "shadowColor", "shadowOffset", "shadowOpacity", "shadowRadius", "shadowSpread", "perspective", "perspectiveOrigin", "transform", "transformOrigin", "transformStyle", "backgroundColor", "opacity", "elevation", "backdropFilter", "backgroundAttachment", "backgroundBlendMode", "backgroundClip", "backgroundImage", "backgroundOrigin", "backgroundPosition", "backgroundRepeat", "backgroundSize", "boxShadow", "clip", "filter", "outlineColor", "outlineOffset", "outlineStyle", "outlineWidth", "overscrollBehavior", "overscrollBehaviorX", "overscrollBehaviorY", "scrollbarWidth", "scrollSnapAlign", "scrollSnapType", "WebkitMaskImage", "WebkitOverflowScrolling"] in View (created by TouchableOpacity) in TouchableOpacity (at ProgressStep.js:83) in div (created by View) in View (at ProgressButtons.js:6) in div (created by View) in View (at ProgressButtons.js:5) in ProgressButtons (at ProgressStep.js:96) in div (created by View) in View (at ProgressStep.js:93) in ProgressStep (at register_buyer/index.tsx:68) in div (created by View) in View (at ProgressSteps.js:67) in div (created by View) in View (at ProgressSteps.js:65) in ProgressSteps (at register_buyer/index.tsx:60) in div (created by View) in View (at register_buyer/index.tsx:58) in RegisterBuyerScreen (created by SceneView) in SceneView (created by CardContainer) in div (created by View) in View (created by CardContainer) in div (created by View) in View (created by CardContainer) in div (created by View) in View (created by Card) in div (created by View) in View (created by AnimatedComponent) in AnimatedComponent (created by PanGestureHandler) in PanGestureHandler (created by Card) in div (created by View) in View (created by AnimatedComponent) in AnimatedComponent (created by Card) in div (created by View) in View (created by Card) in Card (created by CardContainer) in CardContainer (created by CardStack) in div (created by View) in View (created by AnimatedComponent) in AnimatedComponent (at screens.web.js:105) in Screen (created by MaybeScreen) in MaybeScreen (created by CardStack) in div (created by View) in View (created by MaybeScreenContainer) in MaybeScreenContainer (created by CardStack) in CardStack (created by KeyboardManager) in KeyboardManager (created by Context.Consumer) in SafeAreaProviderCompat (created by StackView) in div (created by View) in View (created by StackView) in StackView (created by StackView) in StackView in Unknown (created by Navigator) in Navigator (created by SceneView) in SceneView (created by SwitchView) in SwitchView (created by Navigator) in Navigator (created by NavigationContainer) in NavigationContainer (at App.tsx:9) in div (created by View) in View (at NativeSafeAreaView.web.tsx:58) in NativeSafeAreaView (at src/index.tsx:26) in SafeAreaProvider (at App.tsx:8) in App (at withExpoRoot.web.js:13) in RootErrorBoundary (at withExpoRoot.web.js:12) in ExpoRootComponent (at registerRootComponent.web.js:6) in RootComponent in div (created by View) in View (created by AppContainer) in div (created by View) in View (created by AppContainer) in AppContainer
-- | --

StepIcon Size

Is it possible to reduce the StepIcon size and text?

With Formik?

I've tried adding Formik third library for forms, and it is not working for me. How can I implement this with Formik?

Help is appreciated, thanks.

This is my attempt:

`

  <Formik
    initialValues={{ email: "" }}
    onSubmit={(values) => {
      console.log(values);
    }}
  >
    {(props) => (
      <View>
        <ProgressSteps>
          <ProgressStep
            label="Info"
            nextBtnStyle={buttonTextStyle}
            nextBtnTextStyle={buttonTextStyle}
            //   onPrevious={this.onPrevStep}
            onNext={() => console.log("Next Step")}
            // errors={errors}
          >
            <TextInput
              style={{ borderWidth: "2px" }}
              onChangeText={props.handleChange("email")}
              value={props.values.email}
            />
            <Button onPress={props.handleSubmit} title="Submit" />
          </ProgressStep>
        </ProgressSteps>
      </View>
    )}
  </Formik>
</Fragment>`

Add option for inner "Next"

hey,

I'd like to use your "Next" and "Previous" buttons' logic in my inner child of "Progress Step" but I couldn't figure out how to do that..

I'd like for your help.
Thanks

Label or Title text size

Hello, is there any prop to change the font size of the ProgressStep label? I don't see it on the documentation. thank you

Can Progress Steps be changed programatically?

Hi there.
I have a slightly different use case in mind: I need the progress steps to indicate progress and stages made externally, not by the user - for example when a person orders something for delivery, the progress steps would indicate what the order status is.

(1) Order Received -> (2) Preparing order -> (3) Ready For Delivery -> (4) En Route ...

Is there a way to programatically change the steps? Should i think about this in a different perspective? Or is this not a proper use case and I should look for alternatives?
BTW, thanks for putting this our here.

Axios request change currentStep

Hi,

I have a ajax call with axios, when return complete i need to change current step, But in changing the state nothing happens. How can I do this?

configure line length between two progress steps

I want to customize the line length between two progress circles. Its current behaviour is as follows.

image

I want to increase the length between 1 and 2 so that select vegetables spreads over the display well, however, I didn't find anything in the docs for that

Trigger onNextStep method with custom button

I'd like to know if there's a way to trigger onNextStep method with a custom View element that's inside a step

Example:

<View onPress={ //onNextStep() call goes here }>
//Element

Thanks!

Scrollable progress steps

If there are more than 5 steps, the step bar is not rendered correctly and the two outer circles are cut off.

'btnStyle' in TouchableOpacity component causing errors in web browser

Hello!,

I am very new at React native, so I am not sure if this is an issue or if I am doing something wrong but I am getting an error when loading my expo app in web and it's coming from this line here

This is the error

image

I believe it happens because of this line here

Any suggestions on how I might get rid of it ?

Thank you!

react-native-progress-steps Prop updates

Hi there,
Thanks for publicly sharing this repo! ❤️

I am needing the following updates:

  • Prop to set the completed labels font color (separate to the disabled label color)
  • Prop to completely hide the ProgressStep buttons
  • activeStep updated so that it supports changing values
  • A prop so that all Steps can be set to complete stage (all showing the completed tick).
  • A prop so that all Steps can be set to failure stage (all showing the failure cross).

How to propagate to previous step manually by pressing on (cancel)button of Alert message.

Prevent Moving to Next Step when Cancel Button is Pressed

confirmNameOfField = () => {
    Alert.alert(
      'Confirm',
      'Confirm the Name of Field',
      [
        {
          text: 'Cancel',
          onPress: () => this.onPrevStep, //Prevent moving to next step and remain on the same activeStep
          style: 'cancel',
        },
        {
          text: 'OK',
          onPress: () => console.log('OK Pressed'),
        },
      ],
      {cancelable: false},
    );
  };
render() {
return(
<ProgressSteps activeStep={0}>
          <ProgressStep
            label="Enter name of field"
            onNext={this.confirmNameOfField}
            onPrevious={this.onPrevStep} 
            scrollViewProps={this.defaultScrollViewProps}>
            <TextInput placeholder="Name of Field" />
          </ProgressStep>
         ...
<ProgressSteps/>
)

show dynamically the steps

hello, I have quizz array and i want to show the steps depending on the length and content of the array.
So what I did is:

<ProgressSteps
       ref={ref => { this.progressSteps = ref }}
       activeStep={this.state.activeStep}>
       { this.state.quizz.map((quiz, i) => {
                return  (
                    <ProgressStep label={quiz.name}
                         nextBtnStyle={styles.nextBtn} nextBtnTextStyle={styles.btnText}
                         scrollViewProps={this.defaultScrollViewProps}>
                    // some other elements
                  </ProgressStep>
                )
         }
 </ProgressSteps>

but I get this error :

Unhandled JS Exception: Invariant Violation: Invariant Violation: React.cloneElement(...): The argument must be a React element, but you passed undefined.

can anyone help me?!

Dynamically add new steps

Looking for a way to dynamically add a new ProgressStep. I have a use case with a step that is only required based on some logic in a previous step. I've tried conditionally rendering the new ProgressStep child within the ProgressSteps, but the new step does not show.

Completed Step Behavior

I was looking to your code and i was hoping if some modifications can be done on steps items behavior on the top, regarding to:

  • Change default text or icon (maybe integrate it with react-native-vector-icons) in both completed step or current step and not just the current label below it.
  • I was looking on the documentation and couldn't find any topic on how to set a custom step as active manually
  • Is there a way to make the steps items touchables and delegate onpress listeners to them?

Rockwell Font

fontFamily "rockwell" is not a system font and has not been loaded through Font.loadAsync

Warning Using Progress Steps VirtualizedLists should never be nested inside plain ScrollViews

Hi! I just updated expo from sdk 35 to 37. Since that I'm getting this error:

VirtualizedLists should never be nested inside plain ScrollViews with the same orientation - use another VirtualizedList-backed container instead.

My code looks like this:

<SafeAreaView style={{flex:1}}> <KeyboardAvoidingView behavior={Platform.OS === "ios" ? "padding" : "position"} enabled > <ScrollView> <Appbar.Header> <Appbar.Action icon="menu" onPress={() => this.props.navigation.toggleDrawer()} /> <Appbar.Content title="Mi Bascula GaMa" subtitle="Registro De Trabajo" /> <Appbar.Action icon="dots-vertical" onPress={this._onMore} /> </Appbar.Header> <ProgressSteps> <ProgressStep label="Registros De Trabajo" onNext={ () => console.log("Funciona!!")} errors={this.state.errors} previousBtnText = {Anterior} nextBtnText = {Siguiente`} >

<FlatList
keyExtractor={this.keyExtractor}
data={ showingBasculas }
renderItem={this.renderItem}
ListEmptyComponent = { <Paragraph style={{ alignSelf : 'center', paddingTop: 50 }}>No hay registros de trabajo disponibles }
/>

						</ProgressStep>
						<ProgressStep 
							label="Reportes Generados"
							onNext={ () => console.log("Funciona!!")}
							errors={this.state.errors} 
							previousBtnText = {`Anterior`}
							finishBtnText = {`Salir`}
							onSubmit={()=>{this.props.navigation.goBack()}} >
							<Divider />
							<FlatList
							keyExtractor={this.keyExtractorInformeTecnicoCab}
							data={ showingInformeTecnicoCab }
							renderItem={this.renderItemInformeTecnicoCab}
							ListEmptyComponent = { <Paragraph style={{ alignSelf : 'center', paddingTop: 50 }}>No data available</Paragraph> }
							/>
							
						</ProgressStep>
					</ProgressSteps> 
					
				</ScrollView>
            </KeyboardAvoidingView>
      	</SafeAreaView>`

I've trie removing the main ScrollView, but I think the ProgressStep component is a ScrollView. Can you help me with this?

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.