Skip to content

Commit

Permalink
fixed non-editable checkboxes in stream edit
Browse files Browse the repository at this point in the history
  • Loading branch information
pricelessrabbit committed Aug 29, 2024
1 parent a42b2d3 commit 3c441f5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions frontend/src/components/stacks/streams/detail/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,15 @@ const Form: FunctionComponent<Props> = ({

<TitleAccordion title="LIMIT" open={!inRead}>
<MaxTimeCmp store={streamSo}
readOnly={inRead || !inNew}
readOnly={inRead}
label="MAX AGE"
value={config.maxAge}
desiredDefault={0}
initDefault={null}
onChange={maxAge => streamSo.setStreamConfig({ ...streamSa.stream.config, maxAge })}
/>
<MaxBytesCmp store={streamSo}
readOnly={inRead || !inNew}
readOnly={inRead}
label="MAX BYTES"
value={config.maxBytes}
onChange={maxBytes => streamSo.setStreamConfig({ ...streamSa.stream.config, maxBytes })}
Expand All @@ -283,19 +284,19 @@ const Form: FunctionComponent<Props> = ({
onChange={maxConsumers => streamSo.setStreamConfig({ ...streamSa.stream.config, maxConsumers })}
/>
<MaxBytesCmp store={streamSo}
readOnly={inRead || !inNew}
readOnly={inRead}
label="MAX MSG SIZE"
value={config.maxMsgSize}
onChange={maxMsgSize => streamSo.setStreamConfig({ ...streamSa.stream.config, maxMsgSize })}
/>
<MaxNumberCmp
readOnly={inRead || !inNew}
readOnly={inRead}
label="MAX MESSAGES"
value={config.maxMsgs}
onChange={maxMsgs => streamSo.setStreamConfig({ ...streamSa.stream.config, maxMsgs })}
/>
<MaxNumberCmp
readOnly={inRead || !inNew}
readOnly={inRead}
label="MAX MSGS PER SUBJECT"
value={config.maxMsgsPerSubject}
onChange={maxMsgsPerSubject => streamSo.setStreamConfig({ ...streamSa.stream.config, maxMsgsPerSubject })}
Expand Down

0 comments on commit 3c441f5

Please sign in to comment.