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 },
 | 
			
		||||
  );
 | 
			
		||||
  useEffect(() => {
 | 
			
		||||
    if (record.usingConfig === 'strategy') {
 | 
			
		||||
    if (!record.exists) {
 | 
			
		||||
      options.onSuccess({
 | 
			
		||||
        data: {},
 | 
			
		||||
      });
 | 
			
		||||
@ -26,6 +26,6 @@ export const useRoleResourceValues = (options) => {
 | 
			
		||||
    if (visible) {
 | 
			
		||||
      result.run();
 | 
			
		||||
    }
 | 
			
		||||
  }, [visible, record.usingConfig]);
 | 
			
		||||
  }, [visible, record.exists]);
 | 
			
		||||
  return result;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user