Skip to content
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ This will allow to integrate the command palette in other contexts than the work
* Duplicate an object
* Duplicate a representation
As a result, some of those menu items are not contributed anymore on invalid use cases such as being able to create a new object in a read only library.
- https://github.com/eclipse-sirius/sirius-web/issues/5702[#5702] [table] Improve the rendering of components used in table cells


== 2025.10.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ const isIconLabelCell = (cell: GQLCell): cell is GQLIconLabelCell => cell.__type

const useStyles = makeStyles()((theme) => ({
wrapper: {
padding: theme.spacing(2),
paddingRight: theme.spacing(1),
paddingLeft: theme.spacing(1),
height: '100%',
width: '100%',
cursor: 'pointer',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const IconLabelCell = ({ cell }: IconLabelCellProps) => {
const theme = useTheme();

return (
<Box display="flex" alignItems="center" gap={theme.spacing(1)}>
<Box display="flex" alignItems="center" gap={theme.spacing(1)} sx={{ height: '100%' }}>
<IconOverlay iconURLs={cell.iconURLs} alt={cell.label} />
{cell.label}
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ export const MultiSelectCell = ({
disabled={disabled || loading}
multiple
size="small"
fullWidth>
disableUnderline={true}
fullWidth
variant="standard"
sx={{ height: '100%' }}>
{cell.options.map((option) => {
return (
<MenuItem key={option.id} value={option.id}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@ export const SelectCell = ({ editingContextId, representationId, tableId, cell,
};

return (
<Select value={cell.value} onChange={handleChange} disabled={disabled || loading} size="small" fullWidth>
<Select
value={cell.value}
onChange={handleChange}
disabled={disabled || loading}
size="small"
fullWidth
disableUnderline={true}
variant="standard"
sx={{ height: '100%' }}>
{cell.options.map((option) => {
return (
<MenuItem key={option.id} value={option.id}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,10 @@
*******************************************************************************/
import TextField from '@mui/material/TextField';
import React, { useEffect, useState } from 'react';
import { makeStyles } from 'tss-react/mui';
import { TextareaCellProps, TextareaCellState } from './TextareaCell.types';
import { useEditTextareaCell } from './useEditTextareaCell';

const useTextareaCellStyles = makeStyles()(() => ({
wrapper: {
overflow: 'auto',
width: '100%',
height: '100%',
},
}));

export const TextareaCell = ({ editingContextId, representationId, tableId, cell, disabled }: TextareaCellProps) => {
const { classes } = useTextareaCellStyles();
const [state, setState] = useState<TextareaCellState>({
value: cell.stringValue,
});
Expand All @@ -46,29 +36,31 @@ export const TextareaCell = ({ editingContextId, representationId, tableId, cell
};

return (
<div className={classes.wrapper}>
<TextField
multiline
value={state.value}
onChange={handleChange}
onBlur={handleBlur}
disabled={disabled || loading}
size="small"
fullWidth
variant="standard"
InputProps={{
<TextField
multiline
value={state.value}
onChange={handleChange}
onBlur={handleBlur}
disabled={disabled || loading}
size="small"
fullWidth
variant="standard"
sx={{
height: '100%',
overflow: 'auto',
}}
slotProps={{
input: {
disableUnderline: true,
sx: {
marginBottom: 0,
padding: '0px',
},
}}
inputProps={{
sx: {
padding: '0px',
sx: { height: '100%' },
inputProps: {
sx: {
maxHeight: '100%',
overflow: 'auto !important',
},
},
}}
/>
</div>
},
}}
/>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,14 @@ export const TextfieldCell = ({ editingContextId, representationId, tableId, cel
fullWidth
variant="standard"
sx={{ height: '100%' }}
InputProps={{
disableUnderline: true,
sx: {
marginBottom: 0,
padding: '0px',
height: '100%',
},
}}
inputProps={{
sx: {
padding: '0px',
height: '100%',
slotProps={{
input: {
disableUnderline: true,
sx: {
marginBottom: 0,
padding: '0px',
height: '100%',
},
},
}}
/>
Expand Down
Loading