-
Notifications
You must be signed in to change notification settings - Fork 835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] categories order including custom category working in v5.2.2 but not in v5.6.0 #951
Comments
In fact, i checked and seems like it stopped working from v5.3.0 and onwards |
This is a consequence of 052badf. The categories prop filters on the |
if ur using react/nextjs and had this issue like i did, init({
data,
custom,
}); and put that in ur component or outside, and make sure u pass custom to the react component aswell, works for me on the latest version. import EmojiData from '@emoji-mart/data/sets/15/twitter.json';
import { init } from 'emoji-mart';
import Picker from '@emoji-mart/react';
const custom = [
{
id: 'category',
name: 'Category Name',
emojis: [{ /* ur emojis */ }]
},
];
const categories = ["activity", "category"];
const categoryIcons = {
category: {
src: './category.png'
},
};
init({
data: EmojiData,
custom,
});
const CustomEmojiPicker = () => {
// can also put init here, works for me
return (
<Picker
data={EmojiData}
custom={custom}
categories={categories}
categoryIcons={categoryIcons}
theme="dark"
set="twitter"
/>
)
} |
Following config works fine with emoji-mart@5.2.2 and the custom category is showing up in the respected order....however "custom" category doesn't even show up with emoji-mart@5.6.0 with the same config
The text was updated successfully, but these errors were encountered: