Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

130
Views
¿Qué resolución está haciendo en esta situación?

Nuevo en Ember, tengo problemas para entender este código:

En el front-end, hay un formulario simple que se usa para enviar la entrada de texto del usuario como retroalimentación

 <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>

Respaldándolo, en el Componente .js tengo:

 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); }; }

¿Cómo puedo rastrear lo que realmente está haciendo este envío? ¿Qué hace resolve en una situación como esta? onSubmitFeedback = resolve;

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Parece que hace referencia a una función que actúa como Promise.resolve , según la documentación .

La función a la que se hace referencia tiene esta firma, donde también toma 2 argumentos como lo hace onSubmitFeedback :

resolve (value, label)

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!