Merge pull request #417 from SaraRandolph/sara.randolph/enhancement/disable_frequent_emoji_sort
enhancement: functionality to disable the frequent emoji sortingdependabot/npm_and_yarn/websocket-extensions-0.1.4
commit
b8fad36c6d
|
@ -289,7 +289,9 @@ export default class NimblePicker extends React.PureComponent {
|
|||
var component = this.categoryRefs['category-1']
|
||||
if (component) {
|
||||
let maxMargin = component.maxMargin
|
||||
component.forceUpdate()
|
||||
if (this.props.enableFrequentEmojiSort) {
|
||||
component.forceUpdate()
|
||||
}
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
if (!this.scroll) return
|
||||
|
|
|
@ -37,6 +37,7 @@ const PickerDefaultProps = {
|
|||
),
|
||||
emojiTooltip: EmojiDefaultProps.tooltip,
|
||||
autoFocus: false,
|
||||
enableFrequentEmojiSort: false,
|
||||
custom: [],
|
||||
skinEmoji: '',
|
||||
notFound: () => {},
|
||||
|
|
|
@ -43,6 +43,7 @@ const PickerPropTypes = {
|
|||
exclude: PropTypes.arrayOf(PropTypes.string),
|
||||
recent: PropTypes.arrayOf(PropTypes.string),
|
||||
autoFocus: PropTypes.bool,
|
||||
enableFrequentEmojiSort: PropTypes.bool,
|
||||
custom: PropTypes.arrayOf(
|
||||
PropTypes.shape({
|
||||
name: PropTypes.string.isRequired,
|
||||
|
|
|
@ -56,6 +56,7 @@ storiesOf('Picker', module)
|
|||
color={color('Highlight color', '#ae65c5')}
|
||||
showPreview={boolean('Show preview', true)}
|
||||
showSkinTones={boolean('Show skin tones', true)}
|
||||
enableFrequentEmojiSort={boolean('Enable frequent sort', false)}
|
||||
custom={CUSTOM_EMOJIS}
|
||||
/>
|
||||
))
|
||||
|
|
Loading…
Reference in New Issue