mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: sync (#334)
This commit is contained in:
		
							parent
							
								
									4acf897494
								
							
						
					
					
						commit
						44ff61ab99
					
				| @ -11,6 +11,9 @@ const mapDispatchToProps = { | ||||
|     updateSetting: updateSettingForGroup('feature'), | ||||
| }; | ||||
| 
 | ||||
| const ArchiveListContainer = connect(mapStateToProps, mapDispatchToProps)(FeatureListComponent); | ||||
| const ArchiveListContainer = connect( | ||||
|     mapStateToProps, | ||||
|     mapDispatchToProps | ||||
| )(FeatureListComponent); | ||||
| 
 | ||||
| export default ArchiveListContainer; | ||||
|  | ||||
| @ -5,9 +5,8 @@ export const useStyles = makeStyles(theme => ({ | ||||
|         position: 'absolute', | ||||
|         top: '4px', | ||||
|     }, | ||||
|     breadcrumbNavParagraph: { textTransform: 'capitalize', color: 'inherit' }, | ||||
|     breadcrumbNavParagraph: { color: 'inherit' }, | ||||
|     breadcrumbLink: { | ||||
|         textTransform: 'capitalize', | ||||
|         textDecoration: 'none', | ||||
|     }, | ||||
| })); | ||||
|  | ||||
| @ -32,12 +32,19 @@ export const mapStateToPropsConfigurable = isFeature => state => { | ||||
|             f => f.project === settings.currentProjectId | ||||
|         ); | ||||
|     } | ||||
| 
 | ||||
|     if (settings.filter) { | ||||
|         try { | ||||
|             const regex = new RegExp(settings.filter, 'i'); | ||||
|             features = features.filter( | ||||
|                 feature => | ||||
|             features = features.filter(feature => { | ||||
|                 if (!isFeature) { | ||||
|                     return ( | ||||
|                         regex.test(feature.name) || | ||||
|                         regex.test(feature.description) || | ||||
|                         (settings.filter.length > 1 && | ||||
|                             regex.test(JSON.stringify(feature))) | ||||
|                     ); | ||||
|                 } | ||||
|                 return ( | ||||
|                     feature.strategies.some(s => checkConstraints(s, regex)) || | ||||
|                     regex.test(feature.name) || | ||||
|                     regex.test(feature.description) || | ||||
| @ -46,7 +53,8 @@ export const mapStateToPropsConfigurable = isFeature => state => { | ||||
|                     ) || | ||||
|                     (settings.filter.length > 1 && | ||||
|                         regex.test(JSON.stringify(feature))) | ||||
|             ); | ||||
|                 ); | ||||
|             }); | ||||
|         } catch (e) { | ||||
|             // Invalid filter regex | ||||
|         } | ||||
|  | ||||
| @ -76,12 +76,10 @@ const FeatureView = ({ | ||||
|     }, []); | ||||
| 
 | ||||
|     useLayoutEffect(() => { | ||||
|         if (features.length === 0) { | ||||
|             if (isFeatureView) { | ||||
|                 fetchFeatureToggles(); | ||||
|             } else { | ||||
|                 fetchArchive(); | ||||
|             } | ||||
|         if (isFeatureView) { | ||||
|             fetchFeatureToggles(); | ||||
|         } else { | ||||
|             fetchArchive(); | ||||
|         } | ||||
|         // eslint-disable-next-line react-hooks/exhaustive-deps | ||||
|     }, []); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user