Fix composer emoji picker hidden for RTL languages

This commit is contained in:
ayumi-signal 2023-11-20 12:46:49 -08:00 committed by GitHub
parent 32e5ac128b
commit be5ac3a1e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -82,6 +82,8 @@ export const EmojiPicker = React.memo(
}: Props,
ref
) => {
const isRTL = i18n.getLocaleDirection() === 'rtl';
const [firstRecent] = React.useState(recentEmojis);
const [selectedCategory, setSelectedCategory] = React.useState<Category>(
categories[0]
@ -445,6 +447,8 @@ export const EmojiPicker = React.memo(
height={height}
columnCount={COL_COUNT}
columnWidth={38}
// react-virtualized Grid default style has direction: 'ltr'
style={{ direction: isRTL ? 'rtl' : 'ltr' }}
rowHeight={getRowHeight}
rowCount={rowCount}
cellRenderer={cellRenderer}