question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow custom heights (non-squares)

See original GitHub issue

Hi there, I’m interested in making a tall dayComponent element. It looks like there isn’t a good way to do this yet. The code says to assume square element sizes.

One way to make this work would be to allow a number or an object to be passed by the user.

// So you could do
maxDayComponentSize={80}

// or
maxDayComponentSize={{
    height: 80,
    width: 300,
}}

Another approach would be to change the height of the element to a min-height. This wouldn’t change the API at all, which is nice.

<View style={[this.props.innerStyle, { height: this.state.height }]}>

(source)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
pedrobslisboacommented, Feb 10, 2021

#273 I’ve made a PR about it and I will keep my attention on it so maybe we can add this feature.

1reaction
jimbolcommented, Aug 23, 2020

Ok I gave this a try.

innerStyle={{
  backgroundColor: 'red',
  minHeight: 200,
}}

The height of the inner element is increased but not the height of the Scroller. Here you can see the red is from innerStyle and the orange is on my custom dayComponent.

Screen Shot 2020-08-23 at 10 25 46 AM

I’m trying to make the dayComponents taller but the scroller cannot be set except with min/maxDayComponentSize (I think).

Here’s where the scroller height is set.

      <View
        style={{ height: this.state.itemHeight, flex: 1 }}
        onLayout={this.onLayout}

Perhaps adding a new style object prop like scrollerStyle? What do you think?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to make a square <div> in CSS with a width refering ...
I've seen a solution with the padding-top property (example), but it only works with a given height . Another way is a JavaScript/jQuery...
Read more >
Get Height and Width of squares in a square
How can I calculate the height and the width of each sub-square? ... yeah it assumed things are squares non squares are slightly...
Read more >
3. Render Extents and Project Setup
World Machine allows you to have multiple Render Extents defined. ... If you want to set a completely custom resolution, just choose ...
Read more >
Project Properties Inspector controls in Motion
In Motion, the Project Properties Inspector controls let you change project size, background color, rendering options, motion blur, and more.
Read more >
Work with aspect ratios in Premiere Pro
Under Video, enter the Frame Size(height) and horizontal(width). Premiere Pro automatically generates the aspect ratio. Fill out the respective ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found