Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow dynamically-sized width #38

Open
nandorojo opened this issue Apr 15, 2021 · 1 comment
Open

Allow dynamically-sized width #38

nandorojo opened this issue Apr 15, 2021 · 1 comment
Assignees
Labels
issue: feature Pull request with new feature
Milestone

Comments

@nandorojo
Copy link

nandorojo commented Apr 15, 2021

At the moment, the calendar uses a static windowWidth variable. This prevents you from making custom-width calendar sizes. Ideally you could pass in a width prop. The best-case-scenario would be to wrap the calendar in a View and use onLayout to stretch its size, although this would result in a flash of hiding it, so perhaps it should just be handled by the user if they want that.

Also, rather than Dimensions.get('window').width, it should use useWindowDimensions so that the state updates if the width changes, such as a phone rotation.

@likern
Copy link
Contributor

likern commented Apr 15, 2021

@nandorojo When it comes to Dimensions.get('window').width I remember I had some issues / bugs with it and had to revert back to using Dimensions.get('window').width.

@likern likern added this to the vnext milestone Apr 15, 2021
@likern likern added the issue: feature Pull request with new feature label Apr 15, 2021
@likern likern self-assigned this Apr 15, 2021
@likern likern modified the milestones: vnext, v0.5.0 Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: feature Pull request with new feature
Projects
None yet
Development

No branches or pull requests

2 participants