set all copyapble keys to true by default
This commit is contained in:
parent
42aa1f6ed0
commit
56db0c58df
@ -81,11 +81,15 @@ const withCopyEdit: (wc: React.ComponentType<CategoryViewProps>) => DataContaine
|
||||
static getDerivedStateFromProps(props, state): DataContainerState {
|
||||
const newBuildingId = props.building == undefined ? undefined : props.building.building_id;
|
||||
const newBuildingRevisionId = props.building == undefined ? undefined : props.building.revision_id;
|
||||
const categoryKeys = {};
|
||||
for (let key in myDictionary) {
|
||||
categoryKeys[key] = true;
|
||||
}
|
||||
if(newBuildingId !== state.currentBuildingId || newBuildingRevisionId > state.currentBuildingRevisionId) {
|
||||
return {
|
||||
error: undefined,
|
||||
copying: false,
|
||||
keys_to_copy: {},
|
||||
keys_to_copy: categoryKeys,
|
||||
buildingEdits: {},
|
||||
currentBuildingId: newBuildingId,
|
||||
currentBuildingRevisionId: newBuildingRevisionId
|
||||
|
Loading…
Reference in New Issue
Block a user