Shell_Casing

submit handler

Mar 13th, 2021 (edited)
483
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const onSubmit = async e => {
  2.     e.preventDefault();
  3.     setSubmitting(true);
  4.  
  5.     if(hbaseAction === 'Alter Table') {
  6.         if(!alterTableAction) {
  7.             alert('Select the alter type!');
  8.         } else {
  9.             console.log('hbase alter table');
  10.             const columnFamily = inputs.map(input => input['name']);
  11.             const stuff = {
  12.                 user: id,
  13.                 action: alterTableValue,
  14.                 payload: { ENV_VARS: { env_name: properties?.env, tableName: baseTable, columnFamily } }
  15.             };
  16.             await setSubmitValues({ ...stuff });
  17.             setSubmitting(false);
  18.             return navigate(`/jira-id`);
  19.         }
  20.     }
  21. };
Add Comment
Please, Sign In to add comment