Skip to content

Conversation

@natanrolnik
Copy link
Contributor

@natanrolnik natanrolnik commented Feb 19, 2017

This PR fixes the display of Parse.Files and GeoPoints in the Config section of the Dashboard.
Now that @flovilmart fixed saving Files to Config in Parse Server (parse-community/parse-server#3457), this is the last bit to have it working in the dashboard.

Before:

captura de tela 2017-02-20 as 13 30 17

captura de tela 2017-02-20 as 13 19 02

After

captura de tela 2017-02-19 as 23 51 24

captura de tela 2017-02-20 as 13 19 08

@JeremyPlease @dvanwinkle @steven-supersolid if anyone of you could review, it would be great.

Copy link
Contributor

@flovilmart flovilmart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove that and handle in openModal

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove that :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert that :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove all that, and check in openModal

let openModal = () => this.setState({
       modalOpen: true,
       modalParam: data.param,
       modalType: type,
        modalValue: modalValue
      });

// to:

let openModal = () => {
  if (modalValue instanceof Parse.File) { return }
  this.setState({
       modalOpen: true,
       modalParam: data.param,
       modalType: type,
       modalValue: modalValue
  });
}

@facebook-github-bot
Copy link

@natanrolnik updated the pull request - view changes

render() {
let inputProps = {
type: 'file',
value: null,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was generating a warning with files

@natanrolnik
Copy link
Contributor Author

natanrolnik commented Feb 20, 2017

@flovilmart thanks for your review!
I indeed could do it in a more elegant way, and I've updated the PR.

But I couldn't move the if (modalValue instanceof Parse.File) { return } condition to the openModal callback. This is because I do want to open the modal when it's a file, I just don't want it to be triggered from the last column. So I kinda created a mix of our two solutions, making it cleaner.

As a plus, I've also fixed the display of GeoPoints!

@natanrolnik natanrolnik merged commit e7cd92e into parse-community:master Feb 20, 2017
@natanrolnik natanrolnik deleted the file-display-error branch February 20, 2017 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants