react-native-spotlight-input icon indicating copy to clipboard operation
react-native-spotlight-input copied to clipboard

bug: header component flashes in foreground on initial render

Open shrugs opened this issue 7 years ago • 1 comments

mov

this occurs on al of my fields, but only on the first render; subsequent focuses are as expected. I expect this is due to the layout calculation here.

The simplest way to handle this is to either 1) allow the developer to pass a "header height" constant to the textinput, which avoids the layout calculation or 2) keep the layout calculation, but provide the header component with a isLayouting prop that the developer can use to render just the transparent container view (upon which the height is calculated) and then, once isLayouting is set to false, renders the actual header content. Perhaps it's possible to render the header and check its layout while it's off screen? So instead of animating the height of the header it's translated on the y axis?

shrugs avatar Oct 09 '18 19:10 shrugs

although, looking at my previous issue #3 the flashing didn't occur then, so ¯\_(ツ)_/¯

shrugs avatar Oct 15 '18 19:10 shrugs