Making Grid expandable creates an empty header

1 Answer 79 Views
Grid
Kenneth
Top achievements
Rank 1
Kenneth asked on 06 Feb 2023, 01:05 PM

Working on a grid which has a Detail view using an expand field. This results in a weird extra TH tag in the header like the following:

 

The code for rendering is the following:

 


  return (
    <Grid
      data={data?.map((item) => ({
        ...item,
        expanded: item?.id === expandedId,
      }))}
      dataItemKey="id"
      expandField="expanded"
      onExpandChange={onExpandChange}
      detail={FeaturesGrid}
      editField="inEdit"
    >
      <GridToolbar className="!items-end">
        <ToolbarSpacer />
        <FloatingLabel
          label="Context name"
          editorId="context-id"
          editorValue={name}
          className="text-gray-500"
        >
          <TextBox
            id="context-name"
            value={name}
            onChange={(event) => setName(event.value as string)}
          />
        </FloatingLabel>
        <ToolbarItem>
          <Button
            icon="add"
            title="Add"
            onClick={addRecord}
            themeColor="success"
            disabled={
              !name || data?.find((item) => item?.name === name) !== undefined
            }
          >
            Add
          </Button>
        </ToolbarItem>
      </GridToolbar>
      <GridColumn width="55" title="Default" field="default" editor="boolean" />
      <GridColumn field="name" title="Name" />
      <GridColumn
        field="featuresAggregate.count"
        title="# Features"
        width={100}
        editable={false}
      />
      <GridColumn
        cell={ActionCell}
        width={55}
        title="Action"
        editable={false}
      />
    </Grid>
  );

Is there something I am doing wrong?

I removed the Toolbar and all other noise, but to no avail.

 

Used versions are:

    "@progress/kendo-data-query": "^1.6.0",
    "@progress/kendo-drawing": "^1.17.2",
    "@progress/kendo-licensing": "^1.3.0",
    "@progress/kendo-react-animation": "^5.9.0",
    "@progress/kendo-react-buttons": "^5.9.0",
    "@progress/kendo-react-charts": "^5.9.0",
    "@progress/kendo-react-conversational-ui": "^5.9.0",
    "@progress/kendo-react-data-tools": "^5.9.0",
    "@progress/kendo-react-dateinputs": "^5.9.0",
    "@progress/kendo-react-dialogs": "^5.9.0",
    "@progress/kendo-react-dropdowns": "^5.9.0",
    "@progress/kendo-react-editor": "^5.9.0",
    "@progress/kendo-react-excel-export": "^5.9.0",
    "@progress/kendo-react-form": "^5.9.0",
    "@progress/kendo-react-gantt": "^5.9.0",
    "@progress/kendo-react-gauges": "^5.9.0",
    "@progress/kendo-react-grid": "^5.9.0",
    "@progress/kendo-react-indicators": "^5.9.0",
    "@progress/kendo-react-inputs": "^5.9.0",
    "@progress/kendo-react-intl": "^5.9.0",
    "@progress/kendo-react-labels": "^5.9.0",
    "@progress/kendo-react-layout": "^5.9.0",
    "@progress/kendo-react-listbox": "^5.9.0",
    "@progress/kendo-react-listview": "^5.9.0",
    "@progress/kendo-react-notification": "^5.9.0",
    "@progress/kendo-react-pdf": "^5.9.0",
    "@progress/kendo-react-pivotgrid": "^5.9.0",
    "@progress/kendo-react-popup": "^5.9.0",
    "@progress/kendo-react-progressbars": "^5.9.0",
    "@progress/kendo-react-ripple": "^5.9.0",
    "@progress/kendo-react-scheduler": "^5.9.0",
    "@progress/kendo-react-sortable": "^5.9.0",
    "@progress/kendo-react-tooltip": "^5.9.0",
    "@progress/kendo-react-treelist": "^5.9.0",
    "@progress/kendo-react-treeview": "^5.9.0",
    "@progress/kendo-react-upload": "^5.9.0",
    "@progress/kendo-theme-bootstrap": "^5.12.0",
    "@progress/kendo-theme-default": "^5.12.0",
    "@progress/kendo-theme-material": "^5.12.0",

1 Answer, 1 is accepted

Sort by
0
Ivaylo
Telerik team
answered on 08 Feb 2023, 12:14 PM

Hello, Kenneth,

Thank you for reaching out to us.

I tried to reproduce this behavior in the following example, but I was not able to:

Can you test it and see whether it works at your end as well and how it differs from your actual setup? It will be really helpful if you provide more details for component configuration or a reproducible example so that I can inspect it further and advise.

Regards,
Ivaylo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid
Asked by
Kenneth
Top achievements
Rank 1
Answers by
Ivaylo
Telerik team
Share this question
or