mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	improve keys
This commit is contained in:
		
							parent
							
								
									1470292198
								
							
						
					
					
						commit
						75eedc9f82
					
				| @ -11,7 +11,12 @@ class SelectedStrategies extends React.Component { | ||||
| 
 | ||||
|     renderName (strategy) { | ||||
|         const parameters = strategy.parameters || {}; | ||||
|         const params = Object.keys(parameters) | ||||
|         const keys = Object.keys(parameters); | ||||
|         if (keys.length === 0) { | ||||
|             return <span>{strategy.name}</span>; | ||||
|         } | ||||
| 
 | ||||
|         const params = keys | ||||
|             .map(param => `${param}="${strategy.parameters[param]}"`) | ||||
|             .join('; '); | ||||
|         return <span>{strategy.name} ({params})</span>; | ||||
| @ -21,7 +26,7 @@ class SelectedStrategies extends React.Component { | ||||
|         const removeStrategy = this.props.removeStrategy; | ||||
|         const configuredStrategies = this.props.configuredStrategies.map((s, index) => ( | ||||
|             <Chip | ||||
|                 style={{ marginRight: '10px' }} | ||||
|                 style={{ marginRight: '10px', marginBottom: '10px' }} | ||||
|                 key={`${index}-${s.name}`} | ||||
|                 deletable | ||||
|                 onDeleteClick={() => removeStrategy(s)} | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user