I have a use case when I use the timegrid view for fullcalendar with react, I use time grid view and I want to make the time column on the left expand by the height of the events(like the images) instead of taking fixed height, is there any way to do that? thanks
Related
I'm trying to implement a camera, but when I start it, it's not scaling well. The component is inside a View, and it is shrunk vertically, but if in the return method I put only the camera, it works well, so I think the problem comes from the View style, but I can't figure out how to solve it. The camera should render when a button is pressed, but when I press it this is what happens:
This is the snack: Snack
Thanks for the help.
I saw your code on snack and if you remove the position absolute property on the View Component you have in Book.js on 243 line and add flex: 1 to that view you will get the desired output. Remeber that View always takes the height of the max content of children if we do not explicity give height or give flex:1. And if we are using position property with flex than position propeties will work but flex properties won't work. So choose one of them and than do your design accordingly. If you need to have position property than take the device height from expo constants and pass that height to the View enclosing your camera.
I want to implement an ag grid in some container. As I scroll the container, I add rows to the grid, which has domLayout: 'autoHeight', so it grows in height.
This works fine, and it looks like infinite scrolling without the ag grid knowing. The problem begins when the table gets big and there are a lot of dom elements created.
Is there a way to use domLayout: 'autoHeight' and virtual rows?
Basically letting the grid grow but not actually rendering the rows that are not in the browser viewport? like ag grid does by default when the height is constant?
I am using React Native Version 0.44.0 and expo app to render some images and text on the screen in a ListView.
My issue is with styling.
A. Originally I had only a View (View1) and an image and a text component side by side within View1. I set up the flexDirection="row" and justifyContent="center" and that centered the image and the text within the screen.
B. I needed to insert another text component with a different style under the first text, but the flexDirection="row" would simply not allow it to go under it.
I inserted View2 and that did allow the texts to be vertically positioned but the higher text got cut off at the right edge of the screen( i believe its because the image is set with a fixed height and width).
I couldn't get the text back in the center until I added View3 and gave it a fixed width.
So View1 has flex=1 , View2 has flex=1, and View3 has width="someValue"
My concern: right now its rendering on the device perfectly. But is this acceptable practice? will it be distorted on other devices or will it render the fixed width dynamically based on the screen resolution since its density-independent pixel unit?
will it render the fixed width dynamically based on the screen
resolution since its density-independent pixel unit?
Nope. It will not be adjusted as per different screen sizes. The width will change from screen to screen. Using flex-box is the best way to get the things
done , but sometimes you need the help of screen width and screen height. For that you can use the Dimensions from the react-native. Here is a guide to use it. And there are also some libraries available to make the app responsive like react-native-responsive and react-native-extended-stylesheet.
In your particular case, you could divide the row view(view1) with 2 inner views having the desired flex. And first inner view may hold the image view, if you find difficulty with the image height and width with its parents height and width, you may also need to refer the image resizemod. Second inner view holds your text. Also remember to add some padding to view1 so that the inner views will always be in the view port and Nevers goes out of the viewport.
Once the page initializes, I can't find a way to resize the height of a vertical panel. If I select the split pane component with jquery and set a min height the component does not respond by resizing its separator or internal panel. Is there any way to change the height of a vertical panel dynamically after the initial page load?
Found a way, just needed to target .v-outer instead of the actual container.
I'm using Highcharts column chart and I want it to be 100% width responsive chart. The container is a simple <div> with no any formatting. When the document loads, the chart is always fixed width 600x400px size. If I resize window or switch to another browser tab, the chart fills the width and becomes responsive full width chart just like I wanted. If I reload page, it's fixed width again. I tried setting width to both container and chart, however, nothing helps. If I move the container div one level above the parent div, It works. How to make the chart become full width on page load also?
Thanks
Chart's width is taken from jQuery.width(container), so if you have chart in some hidden tabs or something similar, width will be undefined. In that case default width and height are set (600x400).
I know this is an old question, but I ran into the exact same issue and found another solution that works great.
As of Highcharts 4.1.5 (could be in older versions as well), the chart object has a reflow() function. View the documentation here.
reflow ()
Reflows the chart to its container. By default, the chart reflows automatically to its container following a window.resize event, as per the chart.reflow option. However, there are no reliable events for div resize, so if the container is resized without a window resize event, this must be called explicitly.
Hope it helps someone else.