react-native-boxes 1.4.17 → 1.4.19

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/Modal.tsx +6 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-boxes",
3
- "version": "1.4.17",
3
+ "version": "1.4.19",
4
4
  "description": "A react native library for rapid development of UI using boxes",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/Modal.tsx CHANGED
@@ -230,6 +230,11 @@ export function Expand(props: ViewProps & {
230
230
 
231
231
  const [fadeAnim] = useState(new Animated.Value(0));
232
232
 
233
+ useEffect(() => {
234
+ if (props.initialExpand != undefined)
235
+ setExpanded(props.initialExpand)
236
+ }, [props.initialExpand])
237
+
233
238
  useEffect(() => {
234
239
  Animated.timing(spinValue, {
235
240
  toValue: expanded ? 1 : 0,
@@ -479,7 +484,7 @@ export const DropDownView = (props: DropDownViewProps) => {
479
484
  readOnly={true}
480
485
  placeholder={props.title}
481
486
  {...props}
482
- value={getSelected()?.title || getSelected()?.id}
487
+ value={getSelected()?.title || getSelected()?.id || props.title}
483
488
  onIconPress={() => { setVisible(true) }}
484
489
  icon={"caret-down"}
485
490
  pointerEvents="none"