Closed igorleonir closed 1 year ago
The prop works as expected, but it is searchPlaceHolder
and not searchPlaceholder
as you used it.
I do see you are right, though. All over the docs it says searchPlaceholder, and really, Placeholder is a word, so it makes more sense to use it. I'll fix the picker, and map both searchPlaceHolder and searchPlaceholder to the correct prop.
@igorleonir, fixed by @talisraeli in #356.
Updating to 4.4.12 should fix this for you. Thank you for reporting this
There is my code ` import EmojiPickerReact from 'emoji-picker-react'; import React, { useRef } from 'react'; import { Popover, OverlayTrigger, Button } from 'react-bootstrap'; import { BiSmile } from 'react-icons/bi';
const EmojiPicker = ({ show, onHide = () => { }, onSuccess = () => { }, }) => { const newRef = useRef(null);
const onClick = (emojiData) => { onSuccess(emojiData.emoji); };
const PopoverClick = ( <Popover style={{ minWidth: '310px', padding: 0 }} id="popover-trigger-click-root-close"> <EmojiPickerReact onEmojiClick={onClick} autoFocusSearch emojiStyle="native" searchPlaceholder="Pesquisar emoji" previewConfig={{ showPreview: false, }} categories={[ { category: 'suggested', name: 'Sugestões', }, { category: 'smileys_people', name: 'Smileys & Pessoas', }, { category: 'animals_nature', name: 'Animais & Natureza', }, { category: 'food_drink', name: 'Comida & Bebida', }, { category: 'travel_places', name: 'Viagem & Lugares', }, { category: 'activities', name: 'Atividades', }, { category: 'objects', name: 'Objetos', }, { category: 'symbols', name: 'Símbolos', }, { category: 'flags', name: 'Bandeiras', }, ]} /> );
return ( <OverlayTrigger show={show} trigger="click" placement="right" overlay={PopoverClick} container={newRef.current} onToggle={onHide} rootClose
export default EmojiPicker; `
The placeholder is always 'Search'