Skip to content

Commit d09da61

Browse files
authored
Merge pull request #715 from RedisInsight/feature/bugfix
#RI-2936 - add input validation
2 parents 6dbeb9e + 4dca17d commit d09da61

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

redisinsight/ui/src/pages/browser/components/stream-details/groups-view/GroupsViewWrapper.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ import {
1414
} from 'uiSrc/slices/browser/stream'
1515
import { ITableColumn } from 'uiSrc/components/virtual-table/interfaces'
1616
import PopoverDelete from 'uiSrc/pages/browser/components/popover-delete/PopoverDelete'
17-
import { consumerGroupIdRegex } from 'uiSrc/utils'
17+
import { consumerGroupIdRegex, validateConsumerGroupId } from 'uiSrc/utils'
1818
import { getFormatTime } from 'uiSrc/utils/streamUtils'
19-
import { KeyTypes, TableCellTextAlignment } from 'uiSrc/constants'
19+
import { TableCellTextAlignment } from 'uiSrc/constants'
2020
import { connectedInstanceSelector } from 'uiSrc/slices/instances/instances'
2121
import { StreamViewType } from 'uiSrc/slices/interfaces/stream'
2222

@@ -226,7 +226,7 @@ const GroupsViewWrapper = (props: Props) => {
226226
id="id"
227227
placeholder="ID*"
228228
value={editValue}
229-
onChange={(e: any) => setEditValue(e.target.value)}
229+
onChange={(e: any) => setEditValue(validateConsumerGroupId(e.target.value))}
230230
onBlur={() => setIsIdFocused(false)}
231231
onFocus={() => setIsIdFocused(true)}
232232
append={(

0 commit comments

Comments
 (0)