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

react-native-slider-picker

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-slider-picker - npm Package Compare versions

Comparing version 1.0.15 to 1.0.16

2

package.json
{
"name": "react-native-slider-picker",
"version": "1.0.15",
"version": "1.0.16",
"description": "Custom range slide picker for React Native. 🚧 UNDER CONSTRUCTION 🚧",

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

@@ -10,5 +10,3 @@ /**

* @param {Number} defaultValue - Optional. Default value. Defaults to 5.
* @param {String} submitCopy - Optional. Value passed to mainActionCaption prop of <Generics.StyledSubmit> in component. Defaults to "Submit" if nothing passed.
* @param {Function} callback - Optional. Called on change. Defaults to '() => {}'.
* @param {Function} submitCallback - Optional. Called when user presses <Generics.StyledSubmit>. Defaults to '() => {}'.
*/

@@ -26,3 +24,2 @@

import { SliderPickerCursor } from './SliderPickerCursor';
import { TapButton } from './TapButton';

@@ -88,6 +85,3 @@ //------------------------------------------------------------------------------

this.defaultValue = this.defaultValueCheckHandler(this.props.defaultValue) ? this.props.defaultValue : 5;
this.submitCopy = this.props.submitCopy ? this.props.submitCopy : 'Submit';
this.callback = this.props.callback ? this.props.callback : () => {};
this.submitCallback = this.props.submitCallback ? this.props.submitCallback : () => {};
this.submitButtonColor = this.props.submitButtonColor ? this.props.submitButtonColor : colors['first-color'];

@@ -101,3 +95,2 @@ //

nonDraggablePressLocation: null,
submitDisabled: false // Submit button is enabled by default
}

@@ -214,14 +207,2 @@ }

{ /* Container for StyledSubmit */ }
<View style={{ marginTop: vw(10) }}>
{/* <TapButton
stretchMode={'full'}
callback={() => this.handleSubmitPress()}
color={}
isDisabled={this.state.submitDisabled}
>
{this.submitCopy}
</TapButton> */}
</View>
</TouchableOpacity>

@@ -284,12 +265,2 @@ )

/**
* Handler for press of submit TapButton. Checks if user has selected minimum amount of choices necessary and will execute submitCallback if so.
* @return {Function} Executes submitCallback function
*/
handleSubmitPress = () => {
// Disable button to prevent multiple clicks
this.setState({ submitDisabled: true });
this.submitCallback(this.state.currentValue);
}
/**
* Handler for press of <Slider> outside of the <Draggable> component. Updates state variables passed to <Draggable> to trigger a re-render of that component in its componentDidUpdate().

@@ -296,0 +267,0 @@ * @param {Number} locationX - Location on x-axis where touch event took place/where used pressed along <Slider>.

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