From 5a7f64b49d5257842c9369938a58bfe2d85bf82a Mon Sep 17 00:00:00 2001 From: SajiburMunna Date: Tue, 8 Mar 2022 10:21:24 +0600 Subject: [PATCH] fixed, while placeholder props value given selected date was not showing in place of placeholder, vice versa. and also refactored getTitleElement method. --- src/ComposePicker.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ComposePicker.js b/src/ComposePicker.js index 199b766..a696c7a 100644 --- a/src/ComposePicker.js +++ b/src/ComposePicker.js @@ -100,17 +100,15 @@ export default class ComposePicker extends Component { }; getTitleElement() { const { placeholder, customStyles = {}, allowFontScaling } = this.props; - const showContent = this.state.showContent; - if (!showContent && placeholder) { return ( - {placeholder} + {this.state.selected || placeholder} ); - } + return (