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

Add back missing key prop for SceneWrapperFooter to fix rendering #5040

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/scenes/WalletListScene.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export function WalletListScene(props: Props) {
sceneWrapperInfo => {
const key = 'WalletListScene-SearchFooter'
return sorting ? (
<SceneFooterWrapper sceneFooterKey={key} noBackgroundBlur sceneWrapperInfo={sceneWrapperInfo} onLayoutHeight={handleFooterLayoutHeight}>
<SceneFooterWrapper key={key} noBackgroundBlur sceneWrapperInfo={sceneWrapperInfo} onLayoutHeight={handleFooterLayoutHeight}>
<View style={styles.sortFooterContainer}>
<ButtonUi4 key="doneButton" mini type="primary" label={lstrings.string_done_cap} onPress={handlePressDone} />
</View>
Expand Down
9 changes: 5 additions & 4 deletions src/components/themed/SceneFooterWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ import { styled } from '../hoc/styled'
import { BlurBackground } from '../ui4/BlurBackground'

export interface SceneFooterProps {
// This component requires a key for the onLayoutHeight prop
sceneFooterKey: string
// This component requires a key prop so that way the onLayoutHeight prop
// will work correctly.
// eslint-disable-next-line react/no-unused-prop-types
key: string

children: React.ReactNode
sceneWrapperInfo?: SceneWrapperInfo
Expand All @@ -22,7 +24,7 @@ export interface SceneFooterProps {
}

export const SceneFooterWrapper = (props: SceneFooterProps) => {
const { sceneFooterKey: key, children, noBackgroundBlur = false, sceneWrapperInfo, onLayoutHeight } = props
const { children, noBackgroundBlur = false, sceneWrapperInfo, onLayoutHeight } = props
const { hasTabs = true, isKeyboardOpen = false } = sceneWrapperInfo ?? {}
const footerOpenRatio = useSceneFooterState(state => state.footerOpenRatio)

Expand Down Expand Up @@ -52,7 +54,6 @@ export const SceneFooterWrapper = (props: SceneFooterProps) => {

return (
<ContainerAnimatedView
key={`${key}-ContainerAnimatedView`}
containerHeight={layout?.height}
footerOpenRatio={footerOpenRatio}
isKeyboardOpen={isKeyboardOpen}
Expand Down
2 changes: 1 addition & 1 deletion src/components/themed/SearchFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const SearchFooter = (props: SearchFooterProps) => {

return (
<SceneFooterWrapper
sceneFooterKey={`${name}-SceneFooterWrapper`}
key={`${name}-SceneFooterWrapper`}
noBackgroundBlur={noBackground}
sceneWrapperInfo={sceneWrapperInfo}
onLayoutHeight={handleFooterLayoutHeight}
Expand Down
Loading