Commit f9f40e9 1 parent 8e7b513 commit f9f40e9 Copy full SHA for f9f40e9
File tree 1 file changed +8
-0
lines changed
frontend/web/components/modals
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,9 @@ const CreateSegment: FC<CreateSegmentType> = ({
259
259
}
260
260
return warnings
261
261
} , [ operators , rules ] )
262
+ //Find any non-deleted rules
263
+ const hasNoRules = ! rules [ 0 ] ?. rules ?. find ( ( v ) => ! v . delete )
264
+
262
265
const rulesEl = (
263
266
< div className = 'overflow-visible' >
264
267
< div >
@@ -296,6 +299,11 @@ const CreateSegment: FC<CreateSegmentType> = ({
296
299
)
297
300
} ) }
298
301
</ div >
302
+ { hasNoRules && (
303
+ < InfoMessage >
304
+ Add at least one AND/NOT rule to create a segment.
305
+ </ InfoMessage >
306
+ ) }
299
307
< Row className = 'justify-content-end' >
300
308
{ ! readOnly && (
301
309
< div onClick = { ( ) => addRule ( 'ANY' ) } className = 'text-center' >
You can’t perform that action at this time.
0 commit comments