Giter Site home page Giter Site logo

Comments (8)

Ragularuban avatar Ragularuban commented on July 21, 2024 1

I guess you could use

let style =  element.props.style;
style = StyleSheet.flatten(style);
if(style.position == 'absolute'){
 ...
}

I have not tested this though.

from react-native-modalize.

jeremybarbet avatar jeremybarbet commented on July 21, 2024 1

@Ragularuban Alright, I don't know what I tried last time, but the element.props.style works fine, the isAbsolute props will be remove in the next release 👍

from react-native-modalize.

jeremybarbet avatar jeremybarbet commented on July 21, 2024 1

You can now pass a scrollview/flatlist/sectionlist https://jeremybarbet.github.io/react-native-modalize/#/PROPSMETHODS?id=sectionlistprops

It will be available in next release

from react-native-modalize.

jeremybarbet avatar jeremybarbet commented on July 21, 2024

Are you thinking about something like this https://facebook.github.io/react-native/docs/sectionlist#stickysectionheadersenabled?

Maybe the absolute property for the header/footer is not specific enough. But in short, isAbsolute makes the header either on top of the scrollview or not.

Do you think about something better?

from react-native-modalize.

Ragularuban avatar Ragularuban commented on July 21, 2024

@jeremybarbet that implementation also works fine.
A simple implementation would be https://facebook.github.io/react-native/docs/scrollview#stickyheaderindices

from react-native-modalize.

Ragularuban avatar Ragularuban commented on July 21, 2024

Maybe the absolute property for the header/footer is not specific enough. But in short, isAbsolute makes the header either on top of the scrollview or not.

I figured it later on. I believe the documentation could state that we must add custom stylings to make it work.

from react-native-modalize.

jeremybarbet avatar jeremybarbet commented on July 21, 2024

I have to take a look for the stickyHeaderIndices, but I don't see a reason it wouldn't work.

Yes, you are right, this is confusing. I should say "if you use position absolute on your header component then you have to pass isAbsolute: true". I wanted and still, want to do it automatically, but I haven't found a way to check the header style object to see if the position property is passed or not. Any ideas are welcome!

from react-native-modalize.

jeremybarbet avatar jeremybarbet commented on July 21, 2024

Yes this is what I wanted to do, but I couldn't make it work. I'll try to find a way to remove this isAbsolute props, very not ideal

from react-native-modalize.

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.