question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

form hope to add getAllFieldsName property

See original GitHub issue

What problem does this feature solve?

dynamic this.props.form.setFieldsValue()

What does the proposed API look like?

const data = {.........};
const fields = this.props.form.getAllFieldsName();
const temp = {};
fields.forEach(item=>temp[item]=data[item]);
this.props.form.setFieldsValue(temp);

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
hengkxcommented, Jan 24, 2018
      const fields = Object.keys(this.props.form.getFieldsValue());
      const fieldsValue = {};
      fields.forEach(item => {
        fieldsValue[item] = getByIdRes.data[item];
      });
      this.props.form.setFieldsValue(fieldsValue);
Read more comments on GitHub >

github_iconTop Results From Across the Web

Exclude fields from printing in Twig - Drupal Answers
I am overriding the fields template views-view-fields--machine_name.html.twig . I want to render some Fields in a different div than the other ...
Read more >
Get names of all keys in the collection - mongodb
Hi there! I've just posted a follow-up to this question asking how to make this snippet work even with keys located at deeper...
Read more >
How to Create a Property Listing Website - YouTube
Sign up for a free Jotform account at: https://link.jotform.com/MrMppUoieiMore and more people are searching for properties online — so it's ...
Read more >
Error 404 Not Found Using Pug & Express and MongoDB ...
First add var registerRoute = require("./path/to/route.js");. after your other requires. Then add app.use(registerRoute). in place of this line:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found