react-native-gifted-chat
Advanced tools
Comparing version 0.2.8 to 0.2.9
{ | ||
"name": "react-native-gifted-chat", | ||
"version": "0.2.8", | ||
"version": "0.2.9", | ||
"description": "The most complete chat UI for React Native", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -126,3 +126,3 @@ # Gifted Chat | ||
- **`renderAvatar`** _(Function)_ - Custom message avatar; set to `null` to not render any avatar for the message | ||
- **`showUserAvatar`** _(Function)_ - Whether to render an avatar for the current user; default is `false`, only show avatars for other users | ||
- **`showUserAvatar`** _(Bool)_ - Whether to render an avatar for the current user; default is `false`, only show avatars for other users | ||
- **`onPressAvatar`** _(Function(`user`))_ - Callback when a message avatar is tapped | ||
@@ -151,2 +151,3 @@ - **`renderAvatarOnTop`** _(Bool)_ - Render the message avatar at the top of consecutive messages, rather than the bottom; default is `false` | ||
- **`listViewProps`** _(Object)_ - Extra props to be passed to the messages [`<ListView>`](https://facebook.github.io/react-native/docs/listview.html); some props can't be overridden, see the code in `MessageContainer.render()` for details | ||
- **`textInputProps`** _(Object)_ - Extra props to be passed to the [`<TextInput>`](https://facebook.github.io/react-native/docs/textinput.html) | ||
- **`keyboardShouldPersistTaps`** _(Enum)_ - Determines whether the keyboard should stay visible after a tap; see [`<ScrollView>`](https://facebook.github.io/react-native/docs/scrollview.html) docs | ||
@@ -153,0 +154,0 @@ - **`onInputTextChanged`** _(Function)_ - Callback when the input text changes |
@@ -36,9 +36,11 @@ import PropTypes from 'prop-types'; | ||
onChangeText={text => this.onChangeText(text)} | ||
onChangeText={(text) => this.onChangeText(text)} | ||
style={[styles.textInput, this.props.textInputStyle, {height: this.props.composerHeight}]} | ||
style={[styles.textInput, this.props.textInputStyle, { height: this.props.composerHeight }]} | ||
autoFocus={this.props.textInputAutoFocus} | ||
value={this.props.text} | ||
accessibilityLabel={this.props.text || this.props.placeholder} | ||
enablesReturnKeyAutomatically={true} | ||
enablesReturnKeyAutomatically | ||
underlineColorAndroid="transparent" | ||
@@ -78,2 +80,3 @@ {...this.props.textInputProps} | ||
textInputStyle: {}, | ||
textInputAutoFocus: false, | ||
onTextChanged: () => { | ||
@@ -95,2 +98,3 @@ }, | ||
textInputStyle: TextInput.propTypes.style, | ||
textInputAutoFocus: PropTypes.bool, | ||
}; |
@@ -10,3 +10,3 @@ import PropTypes from 'prop-types'; | ||
import moment from 'moment/min/moment-with-locales.min'; | ||
import moment from 'moment'; | ||
@@ -13,0 +13,0 @@ import { isSameDay, isSameUser, warnDeprecated } from './utils'; |
@@ -11,3 +11,3 @@ import PropTypes from 'prop-types'; | ||
import ActionSheet from '@expo/react-native-action-sheet'; | ||
import moment from 'moment/min/moment-with-locales.min'; | ||
import moment from 'moment'; | ||
import uuid from 'uuid'; | ||
@@ -173,3 +173,3 @@ | ||
getKeyboardHeight() { | ||
if (Platform.OS === 'android') { | ||
if (Platform.OS === 'android' && !this.props.forceGetKeyboardHeight) { | ||
// For android: on-screen keyboard resized main container and has own height. | ||
@@ -559,2 +559,3 @@ // @see https://developer.android.com/training/keyboard-input/visibility.html | ||
maxInputLength: null, | ||
forceGetKeyboardHeight: false, | ||
}; | ||
@@ -606,2 +607,3 @@ | ||
maxInputLength: PropTypes.number, | ||
forceGetKeyboardHeight: PropTypes.bool, | ||
}; | ||
@@ -608,0 +610,0 @@ |
@@ -7,2 +7,3 @@ import PropTypes from 'prop-types'; | ||
View, | ||
StyleSheet, | ||
} from 'react-native'; | ||
@@ -142,3 +143,6 @@ | ||
return ( | ||
<View ref='container' style={{flex:1}}> | ||
<View | ||
ref='container' | ||
style={styles.container} | ||
> | ||
<ListView | ||
@@ -164,2 +168,8 @@ enableEmptySections={true} | ||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1 | ||
} | ||
}); | ||
MessageContainer.defaultProps = { | ||
@@ -166,0 +176,0 @@ messages: [], |
@@ -10,3 +10,3 @@ import PropTypes from 'prop-types'; | ||
import moment from 'moment/min/moment-with-locales.min'; | ||
import moment from 'moment'; | ||
@@ -13,0 +13,0 @@ export default class Time extends React.Component { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
118003
2160
221
0