Giter VIP home page Giter VIP logo

Comments (8)

samaguilar avatar samaguilar commented on July 19, 2024 1

Yes! Mobile is working on my end now. Really appreciate it!

from react-schedule-selector.

bibekg avatar bibekg commented on July 19, 2024

Hm, which device/browser are you using? It seems to be working for me on my iPhone via Safari.

from react-schedule-selector.

samaguilar avatar samaguilar commented on July 19, 2024

The demo happens to work flawlessly on mobile. For clarification, this issue seems to only occur on newly created projects using the package. I'll add the ScheduleSelector component to my new project, copy the same props/code from the demo, and still face the same problem (unable to click and drag over cells on mobile).

from react-schedule-selector.

bibekg avatar bibekg commented on July 19, 2024

Hm, could you share a code example where you run into this issue? Perhaps on something like codepen?

from react-schedule-selector.

samaguilar avatar samaguilar commented on July 19, 2024

Sure thing! I've made a CodeSandbox with the package installed.
https://codesandbox.io/s/hardcore-nobel-jfu7i?file=/src/App.js

from react-schedule-selector.

bibekg avatar bibekg commented on July 19, 2024

Thanks for putting that together. I was able to reproduce the issue on my iPhone viewing your CodeSandbox example. However, even after making my own local sample app markup identical to your example, ie.

<div className="App">
  <h1>Hello CodeSandbox</h1>
  <ScheduleSelector
    selection={this.state.schedule}
    numDays={5}
    minTime={8}
    maxTime={22}
    hourlyChunks={2}
    onChange={this.handleDateChange}
  />
</div>

I was still able to successfully select on mobile. This leads me to wonder if it's an issue with the way touch events get propagated through the iframe that CodeSandbox puts the app in.

from react-schedule-selector.

bibekg avatar bibekg commented on July 19, 2024

After doing a bit more in-depth debugging, I realized the problem stems from Styled Component's deprecation of innerRef. A short-term solution is, if possible, to use a version of Styled System prior to v4. There's an active PR (#16) that uses the ref property and enables the use of the newest Styled Components. I'll work on getting that merged in and deployed in a new version.

from react-schedule-selector.

bibekg avatar bibekg commented on July 19, 2024

Just verified the fix from #29 (published as v2.0.0) makes your CodeSandbox example work with the latest version of Styled Components (v5.2.0).

Let me know if it's all good on your end and I'll close this issue out.

from react-schedule-selector.

Related Issues (19)

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.