Skip to content

[CRUD] allow modifying width of custom form components #5098

@Moripaf

Description

@Moripaf

Summary

I'm trying the CRUD custom form component in the latest version and so far its great. however when trying to make my custom form component (its rather large) fullwidth in the form i notice there is no way. there are no slotProps for components with the "custom" type and no other way to make them fullWidth.
I appreciate any help or workaround. I'd do it myself but I'm new to toolpad and wouldn't know where to start

Examples

something like this:

 <Crud<Thing>
      dataSource={dataSource}
      dataSourceCache={dataSourceCache}
      rootPath={path}
      initialPageSize={20}
      slots={{
        list: {
          dataGrid: CustomDataGrid,
        },
      }}
      slotProps={{
       form: {
           custom: {
               fullWidth: true, // or width: 'third' | 'half' | 'full'
           }
       }
      }}
    />

Motivation

No response

Search keywords: CRUD form

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions