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

fix: using .value in second part of columns conditional so columns.va… #462

Conversation

albertjcuac
Copy link
Contributor

@albertjcuac albertjcuac commented Mar 13, 2024

…lue is always array

Pull request template

Columns mapping expects a value coming from a computed property. To fix it in last PR, we had added a .value to the columns property, but the reactivity was not working. The real problem was that in columns computed property the second part of the conditional was returning a computed value, so we had a computed within another (columns.value was of type number[] | ComputedRef<number[]>). In the template, it was already accessing the value of the property. Now, by using .value to ensure that columns is always a ComputedRef<number[]>, everything seems to work fine.

Motivation and context

  • Dependencies. If any, specify:
  • Open issue. If applicable, link: EMP-3706

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that causes existing functionality to not work as expected)
  • Change requires a documentation update

What is the destination branch of this PR?

  • Main
  • Other. Specify:

How has this been tested?

Column picker should appear and should be reactive.

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review on my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

@albertjcuac albertjcuac requested a review from a team as a code owner March 13, 2024 11:36
Copy link

Check PR 462 preview 👀

https://x.test.empathy.co/preview/462/index.html

Copy link
Contributor

@annacv annacv left a comment

Choose a reason for hiding this comment

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

💯

@annacv annacv merged commit a985dc2 into main Mar 13, 2024
4 checks passed
@annacv annacv deleted the bugfix/EMP-3706-archetype-Column-picker-is-not-being-shown-in-desktop-in-staging branch March 13, 2024 11:56
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.

2 participants