resolves iinfinite loop

This commit is contained in:
Alex Corey
2021-06-11 11:48:51 -04:00
committed by Shane McDonald
parent 2309feb6bd
commit da951714d1
2 changed files with 5 additions and 2 deletions

View File

@@ -54,6 +54,7 @@ describe('<AssociateModal />', () => {
test('should fetch and render list items', () => { test('should fetch and render list items', () => {
expect(fetchRequest).toHaveBeenCalledTimes(1); expect(fetchRequest).toHaveBeenCalledTimes(1);
expect(optionsRequest).toHaveBeenCalledTimes(1);
expect(wrapper.find('CheckboxListItem').length).toBe(3); expect(wrapper.find('CheckboxListItem').length).toBe(3);
}); });

View File

@@ -141,8 +141,10 @@ function InstanceList() {
[instanceGroupId] [instanceGroupId]
); );
const readInstancesOptions = () => const readInstancesOptions = useCallback(
InstanceGroupsAPI.readInstanceOptions(instanceGroupId); () => InstanceGroupsAPI.readInstanceOptions(instanceGroupId),
[instanceGroupId]
);
return ( return (
<> <>