Skip to content

bugfix: remove TabController.TabBar defaultProps, use JavaScript default parameters instead #3155

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

Conversation

crazyshakalaka
Copy link
Contributor

@crazyshakalaka crazyshakalaka commented Jun 29, 2024

bugfix: remove TabController.TabBar defaultProps, use JavaScript default parameters instead.

Description

remove code:
TabBar.defaultProps = {
  labelStyle: DEFAULT_LABEL_STYLE,
  selectedLabelStyle: DEFAULT_SELECTED_LABEL_STYLE,
  faderProps: DEFAULT_FADER_PROPS,
  spreadItems: true
};
use parameters instead: 
  const {
    items: propsItems,
    height,
    enableShadow,
    shadowStyle: propsShadowStyle,
    indicatorStyle,
    labelStyle = DEFAULT_LABEL_STYLE,
    selectedLabelStyle = DEFAULT_SELECTED_LABEL_STYLE,
    labelColor,
    selectedLabelColor,
    uppercase,
    iconColor,
    selectedIconColor,
    activeBackgroundColor,
    backgroundColor = Colors.$backgroundElevated,
    faderProps = DEFAULT_FADER_PROPS,
    containerWidth: propsContainerWidth,
    centerSelected,
    spreadItems = true,
    indicatorInsets = Spacings.s4,
    indicatorWidth,
    containerStyle,
    testID
  } = props;

Changelog

components: TabBar
code: remove TabBar.defaultProps

Additional info

issue: #3154

@Inbal-Tish
Copy link
Collaborator

@crazyshakalaka Hi. Thank you for your contribution! What bug are you fixing with this change?

@crazyshakalaka
Copy link
Contributor Author

@crazyshakalaka Hi. Thank you for your contribution! What bug are you fixing with this change?
issue: #3154
this one

Copy link

@sn-cuong sn-cuong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this, running into this a lot lately.

@sn-cuong
Copy link

@Inbal-Tish / can someone approve this? I'd love to be able to have this change, errors have been getting noisy lately

@crazyshakalaka
Copy link
Contributor Author

感谢您修复此问题,最近经常遇到这个问题。

Thank you, It's my honor to be able to help everyone

@crazyshakalaka
Copy link
Contributor Author

@Inbal-Tish/有人能批准吗?我很尝试这样的改变,最近的错误越来越多

I also hope to have it fixed as soon as possible

@sn-cuong
Copy link

@Inbal-Tish Ping

@sn-cuong
Copy link

@crazyshakalaka can you add @Inbal-Tish as reviewer on this PR?

@crazyshakalaka
Copy link
Contributor Author

@Inbal-Tish Hello

@crazyshakalaka
Copy link
Contributor Author

@crazyshakalaka你能添加吗@Inbal-Tish作为此 PR 的审阅者?
I don't seem to be able to operate like this

Copy link
Contributor

@adids1221 adids1221 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, thank you for your contribution

@adids1221 adids1221 merged commit 6c5f8b2 into wix:master Aug 1, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants