vogievetsky commented on a change in pull request #7242: [Console] Add 
compaction dialog in druid console which allows users to add/edit data source 
compaction configuration
URL: https://github.com/apache/incubator-druid/pull/7242#discussion_r265852310
 
 

 ##########
 File path: web-console/src/components/auto-form.tsx
 ##########
 @@ -100,6 +103,15 @@ export class AutoForm<T> extends 
React.Component<AutoFormProps<T>, AutoFormState
     </HTMLSelect>
   }
 
+  private renderJSONInput(field: Field): JSX.Element {
+    const { model, onChange, JSONErrors, updateJSONErrors } = this.props;
+    return <JSONInput
+      value={(model as any)[field.name]}
+      onChange={(e: any) => onChange(Object.assign({}, model, { [field.name]: 
parseStringToJSON(e)}))}
 
 Review comment:
   it would be neater if `JSONInput` has the same value type as the `onChange` 
type, meaning move `parseStringToJSON` into JSON input

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to