Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

230
Vistas
EditableProTable Edit is Not working in ant design pro

I created table with ant design ProTable Component and its Edit function is not working. It showing error like this. ("Cannot read properties of undefined (reading 'toString')"). I tried many ways to solve this problem and cannot found a solution yet.

I want get table data from CSV file upload. That function is already working and data retrieved to the table.

const columns = [
    {
      title: 'First Name',
      valueType: 'string',
      typeof:'string',
      dataIndex: 'fName',
      formItemProps: () => {
        return {
          rules: [{ required: true, message: '' }],
        };
      },
    },
    {
      title: 'Last Name',
      valueType: 'string',
      typeof:'string',
      dataIndex: 'lName',
      formItemProps: () => {
        return {
          rules: [{ required: true, message: '' }],
        };
      },
    },
    {
      title: 'Email',
      valueType: 'string',
      typeof:'string',
      dataIndex: 'email',
      formItemProps: () => {
        return {
          rules: [{ required: true, message: '' }],
        };
      },
    },
    {
      title: 'Position',
      valueType: 'string',
      typeof:'string',
      dataIndex: 'position',
      formItemProps: () => {
        return {
          rules: [{ required: true, message: '' }],
        };
      },
    },
    {
      title: 'Actions',
      valueType: 'option',
      width: 200,
      render: (text, record, _, action) => [
        <a
          key="delete"
          onClick={() => {
            setData(data.filter((item) => item.id !== record.id));
          }}
        >
          Delete
        </a>,
        <a
          key="editable"
          onClick={() => {
            var _a;
            (_a = action === null || action === void 0 ? void 0 : action.startEditable) === null ||
            _a === void 0
              ? void 0
              : _a.call(action, record.id);
          }}
        >
          Edit
        </a>,
      ],
    },
  ];

EditableProTable
          rowKey="id"
          actionRef={actionRef}
          headerTitle=""
          maxLength={5}
          recordCreatorProps={false}
          columns={columns}
          request={async () => ({
            data: data,
            total: 3,
            success: true,
          })}
          value={csvArray}
          onChange={setCsvArray}
          editable={{
            type: 'multiple',
            editableKeys,
            onSave: async (rowKey, data, row) => {
              await waitTime(2000);
            },
            onChange: setEditableRowKeys,
            actionRender: (row, config, defaultDom) => [
              defaultDom.save,
              defaultDom.delete || defaultDom.cancel,
            ],
          }}
        />[![enter image description here][1]][1]
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The editableKeys array contains rows that are in the editing state

const [editableKeys, setEditableRowKeys] = useState(() => csvArray.map((item) => item.index)); // or .map((item=) => item.key));
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda