lyndsiWilliams commented on a change in pull request #17988:
URL: https://github.com/apache/superset/pull/17988#discussion_r783371366



##########
File path: superset-frontend/src/components/ReportModal/index.tsx
##########
@@ -316,18 +329,16 @@ const ReportModal: FunctionComponent<ReportProps> = ({
           id="name"
           name="name"
           value={currentReport?.name || ''}
-          placeholder="Weekly Report"
+          placeholder={t('Weekly Report')}
           required
           validationMethods={{
             onChange: ({ target }: { target: HTMLInputElement }) =>
-              onChange(ActionType.inputChange, {
+              onReducerChange(ActionType.inputChange, {
                 name: target.name,
                 value: target.value,
               }),
           }}
-          errorMessage={
-            currentReport?.name === 'error' ? t('REPORT NAME ERROR') : ''
-          }
+          errorMessage={currentReport?.error || ''}

Review comment:
       Currently the error stays until the user submits the form again. Once 
the hit submit it will rerun, if there's still an error it will stay open with 
that error. If the error is corrected it will close. I think it would be nice 
to have the error cleared as soon as the user fixes it, but I think that would 
require front end validation vs. just back end.




-- 
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.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to