Skip to content

MUI-renderer ListWithDetailMasterItem : Received true for a non-boolean attribute button. #2426

@IceFreez3r

Description

@IceFreez3r

Describe the bug

The ListWithDetailMasterItem component passes button as a boolean property to ListItem, which doesn't exist.

Expected behavior

Don't add the button property.

Maybe it was intended as a class name?

Steps to reproduce the issue

  1. In your json schema create an array of objects, e.g.
{
	foo: {
		type: 'array',
		items: {
			type: 'object',
			properties: {
				bar1: {
					type: 'string',
				},
				bar2: {
					type: 'string',
				},
			},
		},
	},
}
  1. In the UI schema define a ListWithDetails input
{
	type: 'ListWithDetail',
	scope: '#/properties/imaging',
	options: {
		detail: {
			type: 'HorizontalLayout',
			elements: [
				{
					type: 'Control',
					scope: '#/properties/bar1',
				},
				{
					type: 'Control',
					scope: '#/properties/bar2',
				},
			],
		},
	},
}
  1. Pass both to JsonForms as normal

Screenshots

Image

Image

Which Version of JSON Forms are you using?

3.5.1

Package

React Material Renderers

Additional context

The relevant code is here:

<ListItem button selected={selected} onClick={handleSelect(index)}>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions