question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can you add any example for option "dependsOn"

See original GitHub issue

I have a model below

var User = new keystone.List('User')
User.add({
    email: { type: Types.Email, initial: true, required: true, index: true },
    country: { type: Types.Select, options: ['usa', 'thailand', 'vietnam'], emptyOption: false},
    city: { depends on country field but how to fill here?!!! }
})

I see you supported the dependsOn option in document page

dependsOn Object    The field will only be displayed when the paths specified in the object match the current data for the item

But don’t see any example for this? Can you help me? Thanks 😃

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
sokkicommented, Jun 12, 2015

+1 for the ability to pass a function to dependsOn (and maybe other things like options)

In my case, I need to hide a field depending on a fieldvalue of a document that is linked by a relation …

0reactions
mxstbrcommented, Apr 29, 2016
Read more comments on GitHub >

github_iconTop Results From Across the Web

DependsOn attribute - AWS CloudFormation
With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to...
Read more >
Adding a dependsOn to an existing task - Gradle Forums
Hello, How do I add a dependsOn dependency to a task contained in the Java plugin, such as compileTestJava or compileJava? Thanks.
Read more >
Maven – Optional Dependencies and Dependency Exclusions
The idea is that some of the dependencies are only used for certain features in the project and will not be needed if...
Read more >
Stages in Azure Pipelines - Microsoft Learn
With dependencies, stages run in the order of the dependsOn requirements. Pipelines must contain at least one stage with no dependencies.
Read more >
Kconfig Language — The Linux Kernel documentation
A config option can have any number of default values. ... The intent is for “make oldconfig” to add as little as possible...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found