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.

dependencies and required interaction

See original GitHub issue

General information

  • json-editor version: 2.4.0

(This is an enhancement request)

Expected behavior

Fields whose dependency is not met (and thus are hidden) do not trigger required during form validation.

Actual behavior

A hidden input will stop a form from submitting because it has no value. I understand why this doesn’t happen right now, because the element is just set to display: none;. Maybe it would be nice to have a way to set the options parameter based on whether or not the dependency is met?

Steps to reproduce the behavior

value_x: {
       title: 'value_x',
       type: 'boolean',
       format: 'checkbox',
},
value_y: {
       title: 'value_y',
       type: 'string',
       format: 'date',
       options: {
         inputAttributes: {
           required: true,
         },
         dependencies: {
           value_x: true,
         },
       },
},

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
cschloercommented, Oct 16, 2020

On the topic of dependencies, it would also be nice to be able to “clear” the value of the dependent field when the dependency is lost. In the above example, when value_x is set to false, value_y should be able to be set back to ""

0reactions
rupebaccommented, Jul 19, 2022

@rupebac Please open a new issue with an example schema, actually we have several tests running with required_by_default: true.

hello, I have opened a ticket here:

https://github.com/json-editor/json-editor/issues/1183

issue is still there

Read more comments on GitHub >

github_iconTop Results From Across the Web

Aspects, Dependencies and Interactions - Unpaywall
Abstract. The topics on aspects, dependencies and interactions are among the key remaining challenges to be tackled by the Aspect-Oriented.
Read more >
Aspects, Dependencies and Interactions - Lirias
Abstract. The topics on aspects, dependencies and interactions are among the key remaining challenges to be tackled by the Aspect-Oriented.
Read more >
(PDF) Aspects, Dependencies and Interactions. - ResearchGate
Aspects, Dependencies and Interactions. ; The paper proposes some extensions to the AspectJ [2] language for detecting ; aspects usually can be ...
Read more >
User Input dependencies - ChatBot
Dependency Rules​​ The system searches all previously reached User Inputs from all branches. If any of the interaction can't be matched, the bot ......
Read more >
Overview of Dependencies and Interactions With Other Cloud ...
To do so, you assets require a specific setup and must be based on a maintenance-enabled item that's full-lifecycle tracked. Also, your assets...
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