Skip to content

Commit

Permalink
fix: avoid controls column refresh on change
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Jul 3, 2020
1 parent 8f800c1 commit 858044b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ui/blocks/src/PropsTable/BasePropsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export const BasePropsTable: FC<BasePropsTableProps> = ({
const { setControlValue, clickControl } = useControlsContext();
const [copied, setCopied] = useState(false);
const info: Partial<ComponentInfo> = component.info || {};

const controls = useMemo(() => {
const storyControls = visibility !== 'info' ? story.controls || {} : {};
return visibleControls(storyControls);
Expand Down Expand Up @@ -295,7 +294,7 @@ export const BasePropsTable: FC<BasePropsTableProps> = ({
return { columns, rows, groupProps };
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[extraColumns, hasControls, info.props, story.id, visibility],
[hasControls, info.props, story.id, visibility],
);

const onChange = (propName: string, value: any) => {
Expand Down

0 comments on commit 858044b

Please sign in to comment.