Skip to content

Condition actions for #show/#hide not working #249

@marklanham

Description

@marklanham

Which version of the plugin are you using?
[ ] Data Populator for Sketch v3.6.2

Describe the bug
I'm trying to show/hide a layer in Sketch using Data Populator but it doesn't work. I've tried naming the layer to #show["{user.for_hire}"] as the docs suggest but not having any luck. I've also tried making it a symbol but nothing works. These are the different names I've tried calling the layers:

#show["{user.for_hire}"]
#show["{for_hire}"]
#show["{for_hire}" == true]
#show["{user.for_hire == true}"]
#show["{user.for_hire}" == true]
{#show["{user.for_hire}" == true]}
[#show["{user.for_hire}" == true]]

No matter what, the layer is always showing even if the boolean value is set to false in the data. I tried manually hiding the layer to see if it would then show once set to true but it just remains hidden — nothing I've tried works, have spent hours on this now.

I'm using the test datapopulator-demo.sketch template provided by Data Populator and I'm loading the data from this URL:
https://api.unsplash.com/search/photos?client_id=80d96f3329e4b8a67d17ccec7571fef9b606b6d21f0fcd5f2191f84cc5cbf933&page=1&per_page=100&order_by=popular&query=sunset

Environment:

  • macOS Version: macOS Big Sur v11.2.3
  • Sketch Version: 72.1 (124357)
  • Plugin Version: 3.6.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions