@jsonforms/material-renderers 3.2.1 → 3.3.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsonforms/material-renderers",
3
- "version": "3.2.1",
3
+ "version": "3.3.0-alpha.0",
4
4
  "description": "Material Renderer Set for JSON Forms",
5
5
  "repository": "https://github.com/eclipsesource/jsonforms",
6
6
  "bugs": "https://github.com/eclipsesource/jsonforms/issues",
@@ -73,8 +73,8 @@
73
73
  "peerDependencies": {
74
74
  "@emotion/react": "^11.4.1",
75
75
  "@emotion/styled": "^11.3.0",
76
- "@jsonforms/core": "3.2.1",
77
- "@jsonforms/react": "3.2.1",
76
+ "@jsonforms/core": "3.3.0-alpha.0",
77
+ "@jsonforms/react": "3.3.0-alpha.0",
78
78
  "@mui/icons-material": "^5.11.16",
79
79
  "@mui/material": "^5.13.0",
80
80
  "@mui/x-date-pickers": "^6.0.0",
@@ -98,7 +98,7 @@
98
98
  "@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
99
99
  "copy-webpack-plugin": "^5.0.5",
100
100
  "enzyme": "^3.11.0",
101
- "eslint": "^7.32.0",
101
+ "eslint": "^8.56.0",
102
102
  "eslint-config-prettier": "^8.7.0",
103
103
  "eslint-plugin-import": "^2.27.5",
104
104
  "eslint-plugin-prettier": "^4.2.1",
@@ -126,8 +126,8 @@
126
126
  "webpack": "^5.78.0",
127
127
  "webpack-cli": "^5.1.4",
128
128
  "webpack-dev-server": "^4.15.1",
129
- "@jsonforms/react": "3.2.1",
130
- "@jsonforms/core": "3.2.1"
129
+ "@jsonforms/core": "3.3.0-alpha.0",
130
+ "@jsonforms/react": "3.3.0-alpha.0"
131
131
  },
132
132
  "scripts": {
133
133
  "build": "rollup -c rollup.config.js",
@@ -3,6 +3,7 @@ import {
3
3
  ControlProps,
4
4
  DispatchPropsOfMultiEnumControl,
5
5
  hasType,
6
+ isDescriptionHidden,
6
7
  JsonSchema,
7
8
  OwnPropsOfEnum,
8
9
  Paths,
@@ -11,6 +12,7 @@ import {
11
12
  resolveSchema,
12
13
  schemaMatches,
13
14
  schemaSubPathMatches,
15
+ showAsRequired,
14
16
  uiTypeIs,
15
17
  } from '@jsonforms/core';
16
18
 
@@ -21,15 +23,23 @@ import {
21
23
  FormControlLabel,
22
24
  FormGroup,
23
25
  FormHelperText,
26
+ FormLabel,
24
27
  Hidden,
25
28
  } from '@mui/material';
26
29
  import isEmpty from 'lodash/isEmpty';
27
30
  import React from 'react';
31
+ import merge from 'lodash/merge';
32
+ import { useFocus } from '../util';
28
33
 
29
34
  export const MaterialEnumArrayRenderer = ({
35
+ config,
36
+ id,
30
37
  schema,
31
38
  visible,
32
39
  errors,
40
+ description,
41
+ label,
42
+ required,
33
43
  path,
34
44
  options,
35
45
  data,
@@ -38,9 +48,34 @@ export const MaterialEnumArrayRenderer = ({
38
48
  handleChange: _handleChange,
39
49
  ...otherProps
40
50
  }: ControlProps & OwnPropsOfEnum & DispatchPropsOfMultiEnumControl) => {
51
+ const [focused, onFocus, onBlur] = useFocus();
52
+ const isValid = errors.length === 0;
53
+ const appliedUiSchemaOptions = merge({}, config, otherProps.uischema.options);
54
+ const showDescription = !isDescriptionHidden(
55
+ visible,
56
+ description,
57
+ focused,
58
+ appliedUiSchemaOptions.showUnfocusedDescription
59
+ );
60
+
41
61
  return (
42
62
  <Hidden xsUp={!visible}>
43
- <FormControl component='fieldset'>
63
+ <FormControl
64
+ component='fieldset'
65
+ fullWidth={!appliedUiSchemaOptions.trim}
66
+ onFocus={onFocus}
67
+ onBlur={onBlur}
68
+ >
69
+ <FormLabel
70
+ error={!isValid}
71
+ component='legend'
72
+ required={showAsRequired(
73
+ required,
74
+ appliedUiSchemaOptions.hideRequiredAsterisk
75
+ )}
76
+ >
77
+ {label}
78
+ </FormLabel>
44
79
  <FormGroup row>
45
80
  {options.map((option: any, index: number) => {
46
81
  const optionPath = Paths.compose(path, `${index}`);
@@ -49,10 +84,11 @@ export const MaterialEnumArrayRenderer = ({
49
84
  : undefined;
50
85
  return (
51
86
  <FormControlLabel
52
- id={option.value}
87
+ id={id + '-label-' + option.value}
53
88
  key={option.value}
54
89
  control={
55
90
  <MuiCheckbox
91
+ id={id + '-' + option.value}
56
92
  key={'checkbox-' + option.value}
57
93
  isValid={isEmpty(errors)}
58
94
  path={optionPath}
@@ -73,7 +109,9 @@ export const MaterialEnumArrayRenderer = ({
73
109
  );
74
110
  })}
75
111
  </FormGroup>
76
- <FormHelperText error>{errors}</FormHelperText>
112
+ <FormHelperText error={!isValid}>
113
+ {!isValid ? errors : showDescription ? description : null}
114
+ </FormHelperText>
77
115
  </FormControl>
78
116
  </Hidden>
79
117
  );
@@ -42,6 +42,7 @@ import {
42
42
  TableCell,
43
43
  TableHead,
44
44
  TableRow,
45
+ Tooltip,
45
46
  Typography,
46
47
  } from '@mui/material';
47
48
  import {
@@ -319,35 +320,55 @@ const NonEmptyRowComponent = ({
319
320
  {showSortButtons ? (
320
321
  <Fragment>
321
322
  <Grid item>
322
- <IconButton
323
- aria-label={translations.upAriaLabel}
324
- onClick={moveUp}
325
- disabled={!enableUp}
326
- size='large'
323
+ <Tooltip
324
+ id='tooltip-up'
325
+ title={translations.up}
326
+ placement='bottom'
327
+ open={enableUp ? undefined : false}
327
328
  >
328
- <ArrowUpward />
329
- </IconButton>
329
+ <IconButton
330
+ aria-label={translations.upAriaLabel}
331
+ onClick={moveUp}
332
+ disabled={!enableUp}
333
+ size='large'
334
+ >
335
+ <ArrowUpward />
336
+ </IconButton>
337
+ </Tooltip>
330
338
  </Grid>
331
339
  <Grid item>
332
- <IconButton
333
- aria-label={translations.downAriaLabel}
334
- onClick={moveDown}
335
- disabled={!enableDown}
336
- size='large'
340
+ <Tooltip
341
+ id='tooltip-down'
342
+ title={translations.down}
343
+ placement='bottom'
344
+ open={enableDown ? undefined : false}
337
345
  >
338
- <ArrowDownward />
339
- </IconButton>
346
+ <IconButton
347
+ aria-label={translations.downAriaLabel}
348
+ onClick={moveDown}
349
+ disabled={!enableDown}
350
+ size='large'
351
+ >
352
+ <ArrowDownward />
353
+ </IconButton>
354
+ </Tooltip>
340
355
  </Grid>
341
356
  </Fragment>
342
357
  ) : null}
343
358
  <Grid item>
344
- <IconButton
345
- aria-label={translations.removeAriaLabel}
346
- onClick={() => openDeleteDialog(childPath, rowIndex)}
347
- size='large'
359
+ <Tooltip
360
+ id='tooltip-remove'
361
+ title={translations.removeTooltip}
362
+ placement='bottom'
348
363
  >
349
- <DeleteIcon />
350
- </IconButton>
364
+ <IconButton
365
+ aria-label={translations.removeAriaLabel}
366
+ onClick={() => openDeleteDialog(childPath, rowIndex)}
367
+ size='large'
368
+ >
369
+ <DeleteIcon />
370
+ </IconButton>
371
+ </Tooltip>
351
372
  </Grid>
352
373
  </Grid>
353
374
  </NoBorderTableCell>
@@ -33,7 +33,7 @@ import {
33
33
  rankWith,
34
34
  } from '@jsonforms/core';
35
35
  import { withJsonFormsControlProps } from '@jsonforms/react';
36
- import { FormHelperText, Hidden } from '@mui/material';
36
+ import { FormHelperText } from '@mui/material';
37
37
  import { DatePicker, LocalizationProvider } from '@mui/x-date-pickers';
38
38
  import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
39
39
  import {
@@ -69,6 +69,7 @@ export const MaterialDateControl = (props: ControlProps) => {
69
69
  );
70
70
 
71
71
  const [key, setKey] = useState<number>(0);
72
+ const [open, setOpen] = useState<boolean>(false);
72
73
 
73
74
  const format = appliedUiSchemaOptions.dateFormat ?? 'YYYY-MM-DD';
74
75
  const saveFormat = appliedUiSchemaOptions.dateSaveFormat ?? defaultDateFormat;
@@ -103,46 +104,48 @@ export const MaterialDateControl = (props: ControlProps) => {
103
104
  );
104
105
  const value = getData(data, saveFormat);
105
106
 
107
+ if (!visible) {
108
+ return null;
109
+ }
110
+
106
111
  return (
107
- <Hidden xsUp={!visible}>
108
- <LocalizationProvider dateAdapter={AdapterDayjs}>
109
- <DatePicker
110
- key={key}
111
- label={label}
112
- value={value}
113
- onAccept={onChange}
114
- format={format}
115
- views={views}
116
- disabled={!enabled}
117
- slotProps={{
118
- actionBar: ({ wrapperVariant }) => ({
119
- actions:
120
- wrapperVariant === 'desktop'
121
- ? []
122
- : ['clear', 'cancel', 'accept'],
123
- }),
124
- textField: {
125
- id: id + '-input',
126
- required:
127
- required && !appliedUiSchemaOptions.hideRequiredAsterisk,
128
- autoFocus: appliedUiSchemaOptions.focus,
129
- error: !isValid,
130
- fullWidth: !appliedUiSchemaOptions.trim,
131
- inputProps: {
132
- type: 'text',
133
- },
134
- InputLabelProps: data ? { shrink: true } : undefined,
135
- onFocus: onFocus,
136
- onBlur: onBlurHandler,
112
+ <LocalizationProvider dateAdapter={AdapterDayjs}>
113
+ <DatePicker
114
+ open={open}
115
+ onOpen={() => setOpen(true)}
116
+ onClose={() => setOpen(false)}
117
+ key={key}
118
+ label={label}
119
+ value={value}
120
+ onAccept={onChange}
121
+ format={format}
122
+ views={views}
123
+ disabled={!enabled}
124
+ slotProps={{
125
+ actionBar: ({ wrapperVariant }) => ({
126
+ actions:
127
+ wrapperVariant === 'desktop' ? [] : ['clear', 'cancel', 'accept'],
128
+ }),
129
+ textField: {
130
+ id: id + '-input',
131
+ required: required && !appliedUiSchemaOptions.hideRequiredAsterisk,
132
+ autoFocus: appliedUiSchemaOptions.focus,
133
+ error: !isValid,
134
+ fullWidth: !appliedUiSchemaOptions.trim,
135
+ inputProps: {
136
+ type: 'text',
137
137
  },
138
- }}
139
- />
140
- <FormHelperText error={!isValid && !showDescription}>
141
- {firstFormHelperText}
142
- </FormHelperText>
143
- <FormHelperText error={!isValid}>{secondFormHelperText}</FormHelperText>
144
- </LocalizationProvider>
145
- </Hidden>
138
+ InputLabelProps: data ? { shrink: true } : undefined,
139
+ onFocus: onFocus,
140
+ onBlur: onBlurHandler,
141
+ },
142
+ }}
143
+ />
144
+ <FormHelperText error={!isValid && !showDescription}>
145
+ {firstFormHelperText}
146
+ </FormHelperText>
147
+ <FormHelperText error={!isValid}>{secondFormHelperText}</FormHelperText>
148
+ </LocalizationProvider>
146
149
  );
147
150
  };
148
151
 
@@ -33,7 +33,7 @@ import {
33
33
  rankWith,
34
34
  } from '@jsonforms/core';
35
35
  import { withJsonFormsControlProps } from '@jsonforms/react';
36
- import { FormHelperText, Hidden } from '@mui/material';
36
+ import { FormHelperText } from '@mui/material';
37
37
  import { DateTimePicker, LocalizationProvider } from '@mui/x-date-pickers';
38
38
  import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
39
39
  import {
@@ -74,6 +74,7 @@ export const MaterialDateTimeControl = (props: ControlProps) => {
74
74
  appliedUiSchemaOptions.dateTimeSaveFormat ?? defaultDateTimeFormat;
75
75
 
76
76
  const [key, setKey] = useState<number>(0);
77
+ const [open, setOpen] = useState<boolean>(false);
77
78
 
78
79
  const views = appliedUiSchemaOptions.views ?? [
79
80
  'year',
@@ -110,47 +111,48 @@ export const MaterialDateTimeControl = (props: ControlProps) => {
110
111
  );
111
112
  const value = getData(data, saveFormat);
112
113
 
114
+ if (!visible) {
115
+ return null;
116
+ }
113
117
  return (
114
- <Hidden xsUp={!visible}>
115
- <LocalizationProvider dateAdapter={AdapterDayjs}>
116
- <DateTimePicker
117
- key={key}
118
- label={label}
119
- value={value}
120
- onAccept={onChange}
121
- format={format}
122
- ampm={!!appliedUiSchemaOptions.ampm}
123
- views={views}
124
- disabled={!enabled}
125
- slotProps={{
126
- actionBar: ({ wrapperVariant }) => ({
127
- actions:
128
- wrapperVariant === 'desktop'
129
- ? []
130
- : ['clear', 'cancel', 'accept'],
131
- }),
132
- textField: {
133
- id: id + '-input',
134
- required:
135
- required && !appliedUiSchemaOptions.hideRequiredAsterisk,
136
- autoFocus: appliedUiSchemaOptions.focus,
137
- error: !isValid,
138
- fullWidth: !appliedUiSchemaOptions.trim,
139
- inputProps: {
140
- type: 'text',
141
- },
142
- InputLabelProps: data ? { shrink: true } : undefined,
143
- onFocus: onFocus,
144
- onBlur: onBlurHandler,
118
+ <LocalizationProvider dateAdapter={AdapterDayjs}>
119
+ <DateTimePicker
120
+ open={open}
121
+ onOpen={() => setOpen(true)}
122
+ onClose={() => setOpen(false)}
123
+ key={key}
124
+ label={label}
125
+ value={value}
126
+ onAccept={onChange}
127
+ format={format}
128
+ ampm={!!appliedUiSchemaOptions.ampm}
129
+ views={views}
130
+ disabled={!enabled}
131
+ slotProps={{
132
+ actionBar: ({ wrapperVariant }) => ({
133
+ actions:
134
+ wrapperVariant === 'desktop' ? [] : ['clear', 'cancel', 'accept'],
135
+ }),
136
+ textField: {
137
+ id: id + '-input',
138
+ required: required && !appliedUiSchemaOptions.hideRequiredAsterisk,
139
+ autoFocus: appliedUiSchemaOptions.focus,
140
+ error: !isValid,
141
+ fullWidth: !appliedUiSchemaOptions.trim,
142
+ inputProps: {
143
+ type: 'text',
145
144
  },
146
- }}
147
- />
148
- <FormHelperText error={!isValid && !showDescription}>
149
- {firstFormHelperText}
150
- </FormHelperText>
151
- <FormHelperText error={!isValid}>{secondFormHelperText}</FormHelperText>
152
- </LocalizationProvider>
153
- </Hidden>
145
+ InputLabelProps: data ? { shrink: true } : undefined,
146
+ onFocus: onFocus,
147
+ onBlur: onBlurHandler,
148
+ },
149
+ }}
150
+ />
151
+ <FormHelperText error={!isValid && !showDescription}>
152
+ {firstFormHelperText}
153
+ </FormHelperText>
154
+ <FormHelperText error={!isValid}>{secondFormHelperText}</FormHelperText>
155
+ </LocalizationProvider>
154
156
  );
155
157
  };
156
158
 
@@ -45,7 +45,6 @@ export const MaterialRadioGroup = (props: ControlProps & OwnPropsOfEnum) => {
45
45
  const [focused, onFocus, onBlur] = useFocus();
46
46
  const {
47
47
  config,
48
- id,
49
48
  label,
50
49
  required,
51
50
  description,
@@ -69,15 +68,14 @@ export const MaterialRadioGroup = (props: ControlProps & OwnPropsOfEnum) => {
69
68
  return (
70
69
  <Hidden xsUp={!visible}>
71
70
  <FormControl
72
- component={'fieldset' as 'div'}
71
+ component='fieldset'
73
72
  fullWidth={!appliedUiSchemaOptions.trim}
74
73
  onFocus={onFocus}
75
74
  onBlur={onBlur}
76
75
  >
77
76
  <FormLabel
78
- htmlFor={id}
79
77
  error={!isValid}
80
- component={'legend' as 'label'}
78
+ component='legend'
81
79
  required={showAsRequired(
82
80
  required,
83
81
  appliedUiSchemaOptions.hideRequiredAsterisk
@@ -101,7 +101,7 @@ export const MaterialSliderControl = (props: ControlProps) => {
101
101
  <FormLabel
102
102
  htmlFor={id}
103
103
  error={!isValid}
104
- component={'legend' as 'label'}
104
+ component='legend'
105
105
  required={showAsRequired(
106
106
  required,
107
107
  appliedUiSchemaOptions.hideRequiredAsterisk
@@ -33,7 +33,7 @@ import {
33
33
  defaultTimeFormat,
34
34
  } from '@jsonforms/core';
35
35
  import { withJsonFormsControlProps } from '@jsonforms/react';
36
- import { FormHelperText, Hidden } from '@mui/material';
36
+ import { FormHelperText } from '@mui/material';
37
37
  import { TimePicker, LocalizationProvider } from '@mui/x-date-pickers';
38
38
  import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
39
39
  import {
@@ -63,6 +63,7 @@ export const MaterialTimeControl = (props: ControlProps) => {
63
63
  const isValid = errors.length === 0;
64
64
 
65
65
  const [key, setKey] = useState<number>(0);
66
+ const [open, setOpen] = useState<boolean>(false);
66
67
 
67
68
  const showDescription = !isDescriptionHidden(
68
69
  visible,
@@ -104,47 +105,48 @@ export const MaterialTimeControl = (props: ControlProps) => {
104
105
  );
105
106
  const value = getData(data, saveFormat);
106
107
 
108
+ if (!visible) {
109
+ return null;
110
+ }
107
111
  return (
108
- <Hidden xsUp={!visible}>
109
- <LocalizationProvider dateAdapter={AdapterDayjs}>
110
- <TimePicker
111
- key={key}
112
- label={label}
113
- value={value}
114
- onAccept={onChange}
115
- format={format}
116
- ampm={!!appliedUiSchemaOptions.ampm}
117
- views={views}
118
- disabled={!enabled}
119
- slotProps={{
120
- actionBar: ({ wrapperVariant }) => ({
121
- actions:
122
- wrapperVariant === 'desktop'
123
- ? []
124
- : ['clear', 'cancel', 'accept'],
125
- }),
126
- textField: {
127
- id: id + '-input',
128
- required:
129
- required && !appliedUiSchemaOptions.hideRequiredAsterisk,
130
- autoFocus: appliedUiSchemaOptions.focus,
131
- error: !isValid,
132
- fullWidth: !appliedUiSchemaOptions.trim,
133
- inputProps: {
134
- type: 'text',
135
- },
136
- InputLabelProps: data ? { shrink: true } : undefined,
137
- onFocus: onFocus,
138
- onBlur: onBlurHandler,
112
+ <LocalizationProvider dateAdapter={AdapterDayjs}>
113
+ <TimePicker
114
+ open={open}
115
+ onOpen={() => setOpen(true)}
116
+ onClose={() => setOpen(false)}
117
+ key={key}
118
+ label={label}
119
+ value={value}
120
+ onAccept={onChange}
121
+ format={format}
122
+ ampm={!!appliedUiSchemaOptions.ampm}
123
+ views={views}
124
+ disabled={!enabled}
125
+ slotProps={{
126
+ actionBar: ({ wrapperVariant }) => ({
127
+ actions:
128
+ wrapperVariant === 'desktop' ? [] : ['clear', 'cancel', 'accept'],
129
+ }),
130
+ textField: {
131
+ id: id + '-input',
132
+ required: required && !appliedUiSchemaOptions.hideRequiredAsterisk,
133
+ autoFocus: appliedUiSchemaOptions.focus,
134
+ error: !isValid,
135
+ fullWidth: !appliedUiSchemaOptions.trim,
136
+ inputProps: {
137
+ type: 'text',
139
138
  },
140
- }}
141
- />
142
- <FormHelperText error={!isValid && !showDescription}>
143
- {firstFormHelperText}
144
- </FormHelperText>
145
- <FormHelperText error={!isValid}>{secondFormHelperText}</FormHelperText>
146
- </LocalizationProvider>
147
- </Hidden>
139
+ InputLabelProps: data ? { shrink: true } : undefined,
140
+ onFocus: onFocus,
141
+ onBlur: onBlurHandler,
142
+ },
143
+ }}
144
+ />
145
+ <FormHelperText error={!isValid && !showDescription}>
146
+ {firstFormHelperText}
147
+ </FormHelperText>
148
+ <FormHelperText error={!isValid}>{secondFormHelperText}</FormHelperText>
149
+ </LocalizationProvider>
148
150
  );
149
151
  };
150
152
 
@@ -39,6 +39,7 @@ import {
39
39
  Avatar,
40
40
  Grid,
41
41
  IconButton,
42
+ Tooltip,
42
43
  } from '@mui/material';
43
44
  import {
44
45
  ExpandMore as ExpandMoreIcon,
@@ -169,26 +170,40 @@ const ExpandPanelRendererComponent = (props: ExpandPanelProps) => {
169
170
  {showSortButtons && enabled ? (
170
171
  <Fragment>
171
172
  <Grid item>
172
- <IconButton
173
- onClick={moveUp(path, index)}
174
- style={iconStyle}
175
- disabled={!enableMoveUp}
176
- aria-label={translations.upAriaLabel}
177
- size='large'
173
+ <Tooltip
174
+ id='tooltip-up'
175
+ title={translations.up}
176
+ placement='bottom'
177
+ open={enableMoveUp ? undefined : false}
178
178
  >
179
- <ArrowUpward />
180
- </IconButton>
179
+ <IconButton
180
+ onClick={moveUp(path, index)}
181
+ style={iconStyle}
182
+ disabled={!enableMoveUp}
183
+ aria-label={translations.upAriaLabel}
184
+ size='large'
185
+ >
186
+ <ArrowUpward />
187
+ </IconButton>
188
+ </Tooltip>
181
189
  </Grid>
182
190
  <Grid item>
183
- <IconButton
184
- onClick={moveDown(path, index)}
185
- style={iconStyle}
186
- disabled={!enableMoveDown}
187
- aria-label={translations.downAriaLabel}
188
- size='large'
191
+ <Tooltip
192
+ id='tooltip-down'
193
+ title={translations.down}
194
+ placement='bottom'
195
+ open={enableMoveDown ? undefined : false}
189
196
  >
190
- <ArrowDownward />
191
- </IconButton>
197
+ <IconButton
198
+ onClick={moveDown(path, index)}
199
+ style={iconStyle}
200
+ disabled={!enableMoveDown}
201
+ aria-label={translations.downAriaLabel}
202
+ size='large'
203
+ >
204
+ <ArrowDownward />
205
+ </IconButton>
206
+ </Tooltip>
192
207
  </Grid>
193
208
  </Fragment>
194
209
  ) : (
@@ -196,14 +211,20 @@ const ExpandPanelRendererComponent = (props: ExpandPanelProps) => {
196
211
  )}
197
212
  {enabled && (
198
213
  <Grid item>
199
- <IconButton
200
- onClick={removeItems(path, [index])}
201
- style={iconStyle}
202
- aria-label={translations.removeAriaLabel}
203
- size='large'
214
+ <Tooltip
215
+ id='tooltip-remove'
216
+ title={translations.removeTooltip}
217
+ placement='bottom'
204
218
  >
205
- <DeleteIcon />
206
- </IconButton>
219
+ <IconButton
220
+ onClick={removeItems(path, [index])}
221
+ style={iconStyle}
222
+ aria-label={translations.removeAriaLabel}
223
+ size='large'
224
+ >
225
+ <DeleteIcon />
226
+ </IconButton>
227
+ </Tooltip>
207
228
  </Grid>
208
229
  )}
209
230
  </Grid>