fix: fileManager did not close drawer after selecting files (#2716)
This commit is contained in:
		
							parent
							
								
									261678dc56
								
							
						
					
					
						commit
						8db9fda61b
					
				@ -73,7 +73,7 @@ const InternalFileManager = (props) => {
 | 
				
			|||||||
  const collectionField = getField(field.props.name);
 | 
					  const collectionField = getField(field.props.name);
 | 
				
			||||||
  const labelUiSchema = useLabelUiSchema(collectionField?.target, fieldNames?.label || 'label');
 | 
					  const labelUiSchema = useLabelUiSchema(collectionField?.target, fieldNames?.label || 'label');
 | 
				
			||||||
  const compile = useCompile();
 | 
					  const compile = useCompile();
 | 
				
			||||||
  const { setVisible, modalProps } = useActionContext();
 | 
					  const { modalProps } = useActionContext();
 | 
				
			||||||
  const getFilter = () => {
 | 
					  const getFilter = () => {
 | 
				
			||||||
    const targetKey = collectionField?.targetKey || 'id';
 | 
					    const targetKey = collectionField?.targetKey || 'id';
 | 
				
			||||||
    const list = options.map((option) => option[targetKey]).filter(Boolean);
 | 
					    const list = options.map((option) => option[targetKey]).filter(Boolean);
 | 
				
			||||||
@ -121,6 +121,7 @@ const InternalFileManager = (props) => {
 | 
				
			|||||||
    collectionField,
 | 
					    collectionField,
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
  const usePickActionProps = () => {
 | 
					  const usePickActionProps = () => {
 | 
				
			||||||
 | 
					    const { setVisible } = useActionContext();
 | 
				
			||||||
    const { multiple, selectedRows, onChange, options, collectionField } = useContext(RecordPickerContext);
 | 
					    const { multiple, selectedRows, onChange, options, collectionField } = useContext(RecordPickerContext);
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      onClick() {
 | 
					      onClick() {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user