only copy keys from the chosen category by default
This commit is contained in:
parent
bfe519d7fe
commit
52a5a22967
@ -82,8 +82,11 @@ const withCopyEdit: (wc: React.ComponentType<CategoryViewProps>) => DataContaine
|
|||||||
const newBuildingId = props.building == undefined ? undefined : props.building.building_id;
|
const newBuildingId = props.building == undefined ? undefined : props.building.building_id;
|
||||||
const newBuildingRevisionId = props.building == undefined ? undefined : props.building.revision_id;
|
const newBuildingRevisionId = props.building == undefined ? undefined : props.building.revision_id;
|
||||||
const categoryKeys = {};
|
const categoryKeys = {};
|
||||||
|
|
||||||
for (let key in dataFields) {
|
for (let key in dataFields) {
|
||||||
categoryKeys[key] = true;
|
if (dataFields[key].category == props.cat){
|
||||||
|
categoryKeys[key] = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(newBuildingId !== state.currentBuildingId || newBuildingRevisionId > state.currentBuildingRevisionId) {
|
if(newBuildingId !== state.currentBuildingId || newBuildingRevisionId > state.currentBuildingRevisionId) {
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user