Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show resource type in modal (front) #1714

Merged
merged 3 commits into from Jun 4, 2018

Conversation

abulte
Copy link
Contributor

@abulte abulte commented Jun 4, 2018

I had to do some very convoluted stuff (https://github.com/opendatateam/udata/pull/1714/files#diff-a2d75a95cf3f2bde33208a75029b76a9R76) to make sure it shows up both when opening the modal from the dataset page and via a deeplink.

Ideally there is a way to make this filter await on the loading of resource_types but I did not find how: https://github.com/opendatateam/udata/blob/master/js/components/dataset/filters.js#L28.

Copy link
Contributor

@noirbizarre noirbizarre left a comment

Choose a reason for hiding this comment

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

Isn't it simpler with a computed property ? (Maybe you alreay tried and change detection was not working, but I'm asking)

},
fillResourceType() {
if (this.resource.type) {
this.resourceType = resource_types.by_id(this.resource.type).label;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not a computed property ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not working :-(

@abulte abulte merged commit 5855181 into opendatateam:master Jun 4, 2018
@abulte abulte deleted the resource-type-in-modal branch June 4, 2018 11:01
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.

None yet

2 participants