Skip to content

Commit

Permalink
minor fix in the forms where it wasn't getting the correct value in t…
Browse files Browse the repository at this point in the history
…he settings
  • Loading branch information
alfredorubin96 committed Nov 16, 2023
1 parent 86cf207 commit 85d9581
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/extensions/forms/chart/NeoForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,19 @@ enum FormStatus {
*/
const NeoForm = (props: ChartProps) => {
const { settings } = props;
const buttonText = settings?.runButtonText ? settings.runButtonText : 'Submit';
const confirmationMessage = settings?.confirmationMessage ? settings.confirmationMessage : 'Form Submitted.';
const resetButtonText = settings?.resetButtonText ? settings.resetButtonText : 'Reset Form';
const hasResetButton = settings?.hasResetButton ? settings.hasResetButton : true;
const hasSubmitButton = settings?.hasSubmitButton ? settings.hasSubmitButton : true;
const hasSubmitMessage = settings?.hasSubmitMessage ? settings.hasSubmitMessage : true;
const clearParametersAfterSubmit = settings?.clearParametersAfterSubmit ? settings.clearParametersAfterSubmit : false;
const buttonText = settings?.runButtonText ?? 'Submit';
const confirmationMessage = settings?.confirmationMessage ?? 'Form Submitted.';
const resetButtonText = settings?.resetButtonText ?? 'Reset Form';
const hasResetButton = settings?.hasResetButton ?? true;
const hasSubmitButton = settings?.hasSubmitButton ?? true;
const hasSubmitMessage = settings?.hasSubmitMessage ?? true;
const clearParametersAfterSubmit = settings?.clearParametersAfterSubmit ?? false;
const [submitButtonActive, setSubmitButtonActive] = React.useState(true);
const [status, setStatus] = React.useState(FormStatus.DATA_ENTRY);
const [formResults, setFormResults] = React.useState([]);
const debouncedRunCypherQuery = useCallback(debounce(props.queryCallback, RUN_QUERY_DELAY_MS), []);
console.log(settings.hasSubmitButton);
console.log(hasSubmitButton);

// Helper function to force a refresh on all reports that depend on the form.
// All reports that use one or more parameters used in the form will be refreshed.
Expand Down

0 comments on commit 85d9581

Please sign in to comment.