Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

referencing property changes #29

Open
varunagg45 opened this issue Jan 19, 2017 · 0 comments
Open

referencing property changes #29

varunagg45 opened this issue Jan 19, 2017 · 0 comments

Comments

@varunagg45
Copy link

I have a requirement that the value of the field depends on the value of another field.
eg.

schema = {
  title      : "My pretty form",
  description: "Declarative pure data DSLs are the best.",
  type       : "object",
  properties : {
   
   comments: {
      title      : "Your comment",
      description: "Type something here.",
      type       : "string",
      minLength  : 1
    },
    
    anotherField: {
      title      : "autocomplete",
      references: ['comment']                                               // new property
      description: "auto",
      'x-hints': {
        'form': {
          'inputComponent': 'async-autocomplete'
        }
      }
    }
 }
};

Now i added references something new to the above schema. My requirement is that this custom component can have a listener that can listen to any changes to the fields mentioned in references, in above case any change made to comments field should trigger a listener in anotherField. Can someone help me with this?

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

No branches or pull requests

1 participant