@codeleap/mobile 3.4.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codeleap/mobile",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "main": "src/index.ts",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -148,7 +148,7 @@ export const DatePickerModal = (props: DatePickerModalProps) => {
148
148
  const cancelStyle = useNestedStylesByKey('cancelButton', variantStyles)
149
149
  const confirmStyle = useNestedStylesByKey('confirmButton', variantStyles)
150
150
 
151
- const formattedDate = value ? formatDate(value) : placeholder
151
+ const formattedDate = value ? formatDate(value) : ''
152
152
  const { locale } = useI18N()
153
153
 
154
154
  const tempDate = useRef<Date|null>(null)
@@ -9,13 +9,14 @@ import {
9
9
  PropsOf,
10
10
  TypeGuards,
11
11
  useDefaultComponentStyle,
12
+ useRef,
12
13
  } from '@codeleap/common'
13
14
  import {
14
15
  ModalComposition,
15
16
  ModalPresets,
16
17
  ModalParts,
17
18
  } from './styles'
18
- import { StyleSheet } from 'react-native'
19
+ import { ScrollView, StyleSheet } from 'react-native'
19
20
  import { StylesOf } from '../../types/utility'
20
21
 
21
22
  import { Backdrop } from '../Backdrop'
@@ -129,7 +130,7 @@ export const Modal = (modalProps:ModalProps) => {
129
130
  transform: StyleSheet.flatten,
130
131
  styles,
131
132
  }) as ModalProps['styles']
132
-
133
+ const scrollRef = useRef<ScrollView>(null)
133
134
  function getStyles(key: ModalParts) {
134
135
  const s = [
135
136
  variantStyles[key],
@@ -198,7 +199,8 @@ export const Modal = (modalProps:ModalProps) => {
198
199
  showsVerticalScrollIndicator={false}
199
200
  keyboardAware
200
201
  animated
201
-
202
+ // @ts-ignore
203
+ ref={scrollRef}
202
204
  { ...scrollProps}
203
205
  >
204
206
  {dismissOnBackdrop &&