Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 7058 Rev 7059
Línea 17... Línea 17...
17
  onClose,
17
  onClose,
18
  isEdit,
18
  isEdit,
19
}) => {
19
}) => {
20
  const [loading, setLoading] = useState(false)
20
  const [loading, setLoading] = useState(false)
21
  const labels = useSelector(({ intl }) => intl.labels)
21
  const labels = useSelector(({ intl }) => intl.labels)
22
  const [initialData, setInitialData] = useState('')
22
  const [initialData, setInitialData] = useState('<p></p>')
23
  const dispatch = useDispatch()
23
  const dispatch = useDispatch()
Línea 24... Línea 24...
24
 
24
 
Línea 25... Línea 25...
25
  const { handleSubmit, register, setValue, errors, getValues } = useForm()
25
  const { handleSubmit, register, setValue, errors, getValues } = useForm()
Línea 96... Línea 96...
96
  useEffect(() => {
96
  useEffect(() => {
97
    if (!show) {
97
    if (!show) {
98
      setValue('category_id', '')
98
      setValue('category_id', '')
99
      setValue('description', '')
99
      setValue('description', '')
100
      setValue('title', '')
100
      setValue('title', '')
-
 
101
      setValue('image', '')
-
 
102
      setInitialData('<p></p>')
101
    }
103
    }
102
  }, [show])
104
  }, [show])
Línea 103... Línea 105...
103
 
105
 
104
  return (
106
  return (
Línea 147... Línea 149...
147
              )}
149
              )}
148
            </Form.Group>
150
            </Form.Group>
Línea 149... Línea 151...
149
 
151
 
150
            <CKEditor
152
            <CKEditor
151
              onChange={(e) => setValue('description', e.editor.getData())}
-
 
152
              initData={initialData}
153
              onChange={(e) => setValue('description', e.editor.getData())}
153
              onInstanceReady={(e) => e.editor.setData(initialData)}
154
              onInstanceReady={(e) => e.editor.setData(initialData)}
154
              config={CKEDITOR_OPTIONS}
155
              config={CKEDITOR_OPTIONS}
Línea 155... Línea 156...
155
            />
156
            />