Fixed issue where wrong data was being sent to the PATCH API call for table resulting in error while removing tags for columns (#8557)

This commit is contained in:
Aniket Katkar 2022-11-07 19:30:28 +05:30 committed by GitHub
parent e44fafad88
commit af7f8b691a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View File

@ -609,7 +609,16 @@ const EntityTable = ({
</div> </div>
); );
}, },
[isReadOnly, editColumnTag, hasTagEditAccess, isTagLoading] [
isReadOnly,
editColumnTag,
hasTagEditAccess,
isTagLoading,
handleTagSelection,
handleEditColumnTag,
fetchTagsAndGlossaryTerms,
getRequestTagsElement,
]
); );
const columns: ColumnsType<Column> = useMemo( const columns: ColumnsType<Column> = useMemo(

View File

@ -13,7 +13,7 @@
import { AxiosError } from 'axios'; import { AxiosError } from 'axios';
import { compare, Operation } from 'fast-json-patch'; import { compare, Operation } from 'fast-json-patch';
import { isEmpty, isUndefined, omitBy } from 'lodash'; import { isEmpty, isUndefined } from 'lodash';
import { observer } from 'mobx-react'; import { observer } from 'mobx-react';
import { import {
EntityFieldThreadCount, EntityFieldThreadCount,
@ -490,7 +490,7 @@ const DatasetDetailsPage: FunctionComponent = () => {
}; };
const saveUpdatedTableData = (updatedData: Table) => { const saveUpdatedTableData = (updatedData: Table) => {
const jsonPatch = compare(omitBy(tableDetails, isUndefined), updatedData); const jsonPatch = compare(tableDetails, updatedData);
return patchTableDetails(tableId, jsonPatch); return patchTableDetails(tableId, jsonPatch);
}; };