Navigation Menu

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

FlexView ignores basis prop when value is 0 #83

Open
Rifdhan opened this issue Jul 2, 2020 · 1 comment
Open

FlexView ignores basis prop when value is 0 #83

Rifdhan opened this issue Jul 2, 2020 · 1 comment
Labels

Comments

@Rifdhan
Copy link

Rifdhan commented Jul 2, 2020

If I try to pass a value of 0 for the basis prop, the FlexView will ignore that and leave the basis at auto (its default). This can also be seen on the live playground (in the interactive section at the bottom, try entering 0 as the basis).

I suspect this is happening because of an if-condition that checks the value of basis, and a value of 0 evaluates to be falsy, so the if-block acts as if no basis prop was provided. This is potentially happening in FlexView.tsx, on line 201, in the getBasis function.

@giogonzo
Copy link
Member

giogonzo commented Jul 7, 2020

Hi @Rifdhan , thanks for the report, it looks like a valid bug to me. Would you like to submit a PR to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants