feat: refresh when role resource record exists
This commit is contained in:
		
							parent
							
								
									c6f1454ae8
								
							
						
					
					
						commit
						a4e943ace7
					
				@ -17,7 +17,7 @@ export const useRoleResourceValues = (options) => {
 | 
				
			|||||||
    { ...options, manual: true },
 | 
					    { ...options, manual: true },
 | 
				
			||||||
  );
 | 
					  );
 | 
				
			||||||
  useEffect(() => {
 | 
					  useEffect(() => {
 | 
				
			||||||
    if (record.usingConfig === 'strategy') {
 | 
					    if (!record.exists) {
 | 
				
			||||||
      options.onSuccess({
 | 
					      options.onSuccess({
 | 
				
			||||||
        data: {},
 | 
					        data: {},
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
@ -26,6 +26,6 @@ export const useRoleResourceValues = (options) => {
 | 
				
			|||||||
    if (visible) {
 | 
					    if (visible) {
 | 
				
			||||||
      result.run();
 | 
					      result.run();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }, [visible, record.usingConfig]);
 | 
					  }, [visible, record.exists]);
 | 
				
			||||||
  return result;
 | 
					  return result;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user