Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

232
Views
EditableProTable Edit no funciona en ant design pro

Creé una tabla con el componente ProTable de diseño de hormigas y su función de edición no funciona. Muestra un error como este. ("No se pueden leer las propiedades de undefined (leyendo 'toString')"). Intenté muchas formas de resolver este problema y todavía no puedo encontrar una solución.

Quiero obtener datos de la tabla de la carga del archivo CSV. Esa función ya está funcionando y los datos se recuperaron en la tabla.

 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 answers
Answer question

0

La matriz editableKeys contiene filas que están en estado de edición

 const [editableKeys, setEditableRowKeys] = useState(() => csvArray.map((item) => item.index)); // or .map((item=) => item.key));
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!