Skip to content

Commit e5310ce

Browse files
committed
updated
1 parent 3cb61b9 commit e5310ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/javascript/components/data-tables/datastore/schema/class-fields-schema.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ const createSchemaEditSchema = (rows, setState, isSchemaModified) => {
1818
};
1919

2020
const handleFieldDelete = (index) => {
21-
const rowId = parseInt(index, 10);
22-
http.post(`/miq_ae_class/field_delete?arr_id=${rowId}`, { skipErrors: [400] })
21+
// const rowId = parseInt(index, 10);
22+
http.post(`/miq_ae_class/field_delete?arr_id=${index}`, { skipErrors: [400] })
2323
.then(() => {
2424
setState((prev) => ({
2525
...prev,
26-
rows: prev.rows.filter((field) => field.id !== rowId),
26+
rows: prev.rows.filter((field) => field.id !== index),
2727
}));
2828
})
2929
.catch((error) => {

0 commit comments

Comments
 (0)