diff --git a/example/examples/src/routes/SpeedDial/index.tsx b/example/examples/src/routes/SpeedDial/index.tsx index de6e10087..6ccaeed74 100644 --- a/example/examples/src/routes/SpeedDial/index.tsx +++ b/example/examples/src/routes/SpeedDial/index.tsx @@ -42,7 +42,7 @@ export default class Index extends Component { children={[ { icon: , - title: 'Add', + title: Add, onPress: () => console.log('Add'), }, { diff --git a/packages/core/src/SpeedDial/index.tsx b/packages/core/src/SpeedDial/index.tsx index e4d2cac64..b55918230 100644 --- a/packages/core/src/SpeedDial/index.tsx +++ b/packages/core/src/SpeedDial/index.tsx @@ -68,7 +68,7 @@ function SpeedDial(props: SpeedDialProps) { const pan: Animated.ValueXY = useRef(new Animated.ValueXY()).current; const panResponder = useRef( PanResponder.create({ - onMoveShouldSetPanResponder: () => true, + onMoveShouldSetPanResponder: () => isDrag, onPanResponderGrant: () => { pan.setOffset({ x: (pan.x as PanXY)._value, @@ -136,24 +136,30 @@ function SpeedDial(props: SpeedDialProps) { return ( - {success && - children.map((item, i) => ( - - - - ))} + {children.map((item, i) => ( + + + + ))} @@ -174,8 +180,6 @@ const styles = StyleSheet.create({ }, viewPosition: { position: 'absolute', - bottom: 350 - MainHeight, - right: 40, }, homeContainer: {