fix: table selector (#612)
This commit is contained in:
		
							parent
							
								
									451d6ae974
								
							
						
					
					
						commit
						68d35cf597
					
				@ -63,22 +63,31 @@ export const TableSelectorProvider = (props) => {
 | 
				
			|||||||
  if (appends?.length) {
 | 
					  if (appends?.length) {
 | 
				
			||||||
    params['appends'] = appends;
 | 
					    params['appends'] = appends;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					  console.log('record', record);
 | 
				
			||||||
  if (collectionField) {
 | 
					  if (collectionField) {
 | 
				
			||||||
    if (['oho', 'o2m'].includes(collectionField.interface)) {
 | 
					    if (['oho', 'o2m'].includes(collectionField.interface)) {
 | 
				
			||||||
      params['filter'] = {
 | 
					      if (record?.[collectionField.sourceKey]) {
 | 
				
			||||||
        $or: [{
 | 
					        params['filter'] = {
 | 
				
			||||||
 | 
					          $or: [{
 | 
				
			||||||
 | 
					            [collectionField.foreignKey]: {
 | 
				
			||||||
 | 
					              $is: null,
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }, {
 | 
				
			||||||
 | 
					            [collectionField.foreignKey]: {
 | 
				
			||||||
 | 
					              $eq: record?.[collectionField.sourceKey],
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }]
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        params['filter'] = {
 | 
				
			||||||
          [collectionField.foreignKey]: {
 | 
					          [collectionField.foreignKey]: {
 | 
				
			||||||
            $is: null,
 | 
					            $is: null,
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        }, {
 | 
					        }
 | 
				
			||||||
          [collectionField.foreignKey]: {
 | 
					 | 
				
			||||||
            $eq: record?.[collectionField.sourceKey],
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        }]
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (['obo'].includes(collectionField.interface)) {
 | 
					    // if (['obo'].includes(collectionField.interface)) {
 | 
				
			||||||
    }
 | 
					    // }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
    <BlockProvider {...props} params={params}>
 | 
					    <BlockProvider {...props} params={params}>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user