Skip to content

Commit 12a48e8

Browse files
committed
Remove logging
1 parent b7cdd64 commit 12a48e8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/controls/taxonomyPicker/termActions/TermActionsControl.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import * as React from 'react';
22
import { ITermAction, ITermActionsControlProps, ITermActionsControlState, TermActionsDisplayMode, TermActionsDisplayStyle } from './ITermsActions';
33
import { DropdownTermAction } from './DropdownTermAction';
44
import ButtonTermAction from './ButtonTermAction';
5-
import { find } from 'office-ui-fabric-react/lib/Utilities';
65

76
export default class TermActionsControl extends React.Component<ITermActionsControlProps, ITermActionsControlState> {
87

@@ -57,8 +56,12 @@ export default class TermActionsControl extends React.Component<ITermActionsCont
5756
*/
5857
private setActionVisibility = (actionId: string, isHidden: boolean) => {
5958
this.setState((prevState: ITermActionsControlState) => {
60-
const action = find(prevState.availableActions, a => a.id === actionId);
61-
action.hidden = isHidden;
59+
prevState.availableActions.forEach(action => {
60+
if (action.id === actionId) {
61+
action.hidden = isHidden;
62+
}
63+
});
64+
6265
return {
6366
availableActions: prevState.availableActions
6467
};

0 commit comments

Comments
 (0)