Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3171 | Rev 3174 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 3171 Rev 3173
Línea 33... Línea 33...
33
    useSelector((state) => state.shareModal)
33
    useSelector((state) => state.shareModal)
34
  const dispatch = useDispatch()
34
  const dispatch = useDispatch()
Línea 35... Línea 35...
35
 
35
 
36
  const {
36
  const {
37
    control,
37
    control,
38
    formState: { errors, isLoading },
38
    formState: { errors, isSubmitting },
39
    register,
39
    register,
40
    unregister,
40
    unregister,
41
    handleSubmit,
41
    handleSubmit,
42
    setValue,
42
    setValue,
Línea 156... Línea 156...
156
        toggleConfirmModal()
156
        toggleConfirmModal()
157
      }
157
      }
158
    }
158
    }
159
  }, [modalType])
159
  }, [modalType])
Línea 160... Línea -...
160
 
-
 
161
  useEffect(() => {
160
 
162
    if (isOpen) {
-
 
163
      register('description', { required: 'El campo es requerido' })
-
 
164
    }
-
 
Línea 165... Línea 161...
165
  }, [isOpen])
161
  console.log(isSubmitting)
166
 
162
 
167
  return (
163
  return (
168
    <>
164
    <>
169
      <Modal
165
      <Modal
170
        show={isOpen}
166
        show={isOpen}
171
        title={labels.share_a_post}
167
        title={labels.share_a_post}
172
        labelAccept={labels.send}
168
        labelAccept={labels.send}
173
        labelReject={labels.cancel}
169
        labelReject={labels.cancel}
174
        onClose={onClose}
170
        onClose={onClose}
175
        loading={isLoading}
171
        loading={isSubmitting}
176
        formId='share-form'
172
        formId='share-form'
177
      >
173
      >
178
        <Form onSubmit={onSubmit} id='share-form'>
174
        <Form onSubmit={onSubmit} id='share-form'>
Línea 187... Línea 183...
187
              ]}
183
              ]}
188
            />
184
            />
189
          ) : null}
185
          ) : null}
Línea 190... Línea 186...
190
 
186
 
-
 
187
          <Ckeditor
-
 
188
            name='description'
191
          <Ckeditor
189
            control={control}
192
            defaultValue={watchedDescription}
190
            defaultValue={watchedDescription}
-
 
191
            onChange={(value) => setValue('description', value)}
193
            onChange={(value) => setValue('description', value)}
192
            rules={{}}
Línea 194... Línea 193...
194
          />
193
          />
195
 
194
 
196
          {errors.description && (
195
          {errors.description && (