Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

132
Vistas
What resolve is doing in this situation?

New to ember, I am having trouble making sense of this code:

On the front-end, is a simple form, that is used to submit user text input as feedback

      <Form @onSubmit={{perform this.submitFeedback}}>

          <TextField
            @multiline={{3}}
            @placeholder="Additional comments"
            @autoFocus={{not @shouldRenderOptions}}
            @value={{this.feedbackText}}
            @disabled={{this.submitFeedback.isRunning}}
            @onChange={{action (mut this.feedbackText)}}
          />

          <ButtonGroup>
            <Button
              @text="Send feedback"
              @loading={{this.submitFeedback.isRunning}}
              @onClick={{perform this.submitFeedback}}
            />

            <Button
              @text="Cancel"
              @plain={{true}}
              @onClick={{action @onCancel}}
            />
          </ButtonGroup>
      </Form>

Backing it up, on the .js Component I have:

export default class FeedbackFormComponent extends Component {
  /**
   * Callback when the feedback form is submitted
   * Provides `feedbackText` and `wasContentUseful`
   * as arguments.
   *
   * @type {Function}
   * @public
   */
  onSubmitFeedback = resolve;

  @dropTask
  submitFeedback = function* submitFeedback() {
    let { feedbackText, wasContentUseful, onSubmitFeedback } = this;
    yield onSubmitFeedback(wasContentUseful, feedbackText);
  };

}

How can I track, what this submission is actually doing? What is resolve doing in a situation like this? onSubmitFeedback = resolve;

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Looks like that is referencing a function that acts like Promise.resolve, according to the documentation.

The referenced function has this signature, where it also takes in 2 arguments like onSubmitFeedback does:

resolve (value, label)

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda