Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@
const menuProps: Partial<MenuProps> = {
variant: 'menu',
PaperProps: {
style: {
width: 250,
},
sx: {
width:250,

Check failure on line 55 in webapp/src/component/common/form/LanguagesSelect/LanguagesSelect.tsx

View workflow job for this annotation

GitHub Actions / Frontend static check 🪲

Insert `·`
}

Check failure on line 56 in webapp/src/component/common/form/LanguagesSelect/LanguagesSelect.tsx

View workflow job for this annotation

GitHub Actions / Frontend static check 🪲

Insert `,`
},

Check failure on line 57 in webapp/src/component/common/form/LanguagesSelect/LanguagesSelect.tsx

View workflow job for this annotation

GitHub Actions / Frontend static check 🪲

Insert `·`
id: `language-select-${props.context}-menu`,

Check failure on line 58 in webapp/src/component/common/form/LanguagesSelect/LanguagesSelect.tsx

View workflow job for this annotation

GitHub Actions / Frontend static check 🪲

Insert `,`
anchorOrigin: {
vertical: props.placement === 'top' ? 'top' : 'bottom',
horizontal: 'center',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { Checkbox, ListItemText, MenuItem, Divider } from '@mui/material';
import {
Checkbox,
ListItemText,
MenuItem,
Divider,
Tooltip,
} from '@mui/material';
import { T, useTranslate } from '@tolgee/react';

import { putBaseLangFirst } from 'tg.fixtures/putBaseLangFirst';
Expand Down Expand Up @@ -67,16 +73,33 @@
const isBatchOperation = context === 'batch-operations';

const languageItems = languages.map((lang) => (
<MenuItem
key={lang.tag}
value={lang.tag}
data-cy="translations-language-select-item"
onClick={handleLanguageChange(lang.tag)}
disabled={disabledLanguages?.includes(lang.id)}
>
<Checkbox checked={value?.includes(lang.tag)} size="small" />
<ListItemText primary={lang.name} />
</MenuItem>
<span key={lang.tag} style={{ display: 'inline-block', width: '100%' }}>
<MenuItem
value={lang.tag}
data-cy="translations-language-select-item"
onClick={handleLanguageChange(lang.tag)}
disabled={disabledLanguages?.includes(lang.id)}
>
<Checkbox checked={value?.includes(lang.tag)} size="small" />
<Tooltip title={lang.name} placement="right" >
<ListItemText
primary={lang.name}
sx={(theme) => ({
'& .MuiListItemText-primary': {
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
[theme.breakpoints.down('sm')]: {
whiteSpace: 'normal',

Check failure on line 93 in webapp/src/component/common/form/LanguagesSelect/getLanguagesContent.tsx

View workflow job for this annotation

GitHub Actions / Frontend static check 🪲

Delete `·`

Check failure on line 93 in webapp/src/component/common/form/LanguagesSelect/getLanguagesContent.tsx

View workflow job for this annotation

GitHub Actions / Frontend static check 🪲

Delete `·`
textOverflow: 'unset',
overflow: 'visible',
},
},
})}
/>
</Tooltip>
</MenuItem>
</span>
));

if (isBatchOperation) {
Expand Down
Loading