Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-material-bottom-navigation

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-material-bottom-navigation - npm Package Compare versions

Comparing version 0.5.2 to 0.5.3

.git

17

lib/BottomNavigation.js

@@ -68,2 +68,3 @@ /**

this.layoutWillChange = false
this.lastTabChangeDate = -1
this.dimensions = { width: -1, height: -1 }

@@ -144,3 +145,2 @@ this.nextActiveTab = props.activeTab

}
render() {

@@ -202,4 +202,19 @@ const {

}
_canChangeTabs() {
//Ignore tab taps that are < .5 seconds apart
const TAB_BLOCK_DELAY_SECONDS = .5;
if (this.lastTabChangeDate < 0) {
return true
}
return (new Date() - this.lastTabChangeDate) > TAB_BLOCK_DELAY_SECONDS * 1000
}
_handleTabChange = ({ tabIndex, barBackgroundColor }) => {
if (this.nextActiveTab === this.activeTab || !this._canChangeTabs()) {
//Block repetitive or super fast tab switches. Fixes Issue #32.
return;
} else {
this.lastTabChangeDate = new Date();
}
const { x, y } = this.iconPositions[tabIndex]

@@ -206,0 +221,0 @@

2

package.json
{
"name": "react-native-material-bottom-navigation",
"version": "0.5.2",
"version": "0.5.3",
"description": "JS Implementation of the Material Design Guidelines' Bottom Navigation for react-native",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc