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

User shouldn't be able to change the type of the first table #2324

Merged
merged 1 commit into from
Feb 19, 2018
Merged

User shouldn't be able to change the type of the first table #2324

merged 1 commit into from
Feb 19, 2018

Conversation

kravets-levko
Copy link
Collaborator

Issue #2312

this.canChangeType = !(
(this.visualization.type === 'TABLE') &&
(this.visualization.id === min(pluck(this.query.visualizations, 'id')))
);
Copy link
Member

Choose a reason for hiding this comment

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

Maybe a simpler solution will be to not let the user change type after creating the visualization? I don't see much reason for a user to change type after creation and it will make it less of a guess work here :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hm, makes sense. Will do 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if I understand the intention behind the revised logic. Could you please explain? Because if I understand correctly, I think the revised logic is more complex and difficult to discover.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @deecay ! This code is outdated (@arikfr also didn't like it 😄 ) Now everything is much simpler 👌

@arikfr arikfr merged commit e0c5eab into getredash:master Feb 19, 2018
@kravets-levko kravets-levko deleted the bug/type-of-first-table branch February 11, 2019 16:48
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