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

Implemented template support for 'rel' property on href's schema #606

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

perevernihata
Copy link

If you're trying to use template feature with 'rel' property in "links" object (like on the json bellow), it does not work in the vanilla editor.
Here the direct link to an example - http://goo.gl/Q135mw

{  
   "type":"array",
   "title":"Dynamic urls",
   "items":{  
      "type":"object",
      "id":"related_im_prop_item",
      "properties":{  
         "name":{  
            "type":"string",
            "watch":{  
               "link_id":"related_im_prop_item.id",
               "link_title":"related_im_prop_item.name"
            },
            "links":[  
               {  
                  "href":"/test/path/{{link_id}}",
                  "rel":"{{link_title}}"
               }
            ]
         },
         "id":{  
            "type":"string"
         }
      }
   }
}

This change is aimed to fix the problem.

@perevernihata
Copy link
Author

Well, basically, I've found a little bug in my code. It throws an exception in case 'rel' is not defined. Am I supposed to add another pull request, or should I just post one-line hotfix here?

Kanabanarama added a commit to dmstr-forks/jdorn-json-editor that referenced this pull request Jul 26, 2017
xvaara referenced this pull request in json-editor/json-editor Nov 21, 2017
* commit '27b611a766daf680f60f8b14779284bd9775175c': (44 commits)
  Added selenium tests with mocha
  Revert "Merge branch 'mehmetb-master' into develop"
  Include expanded schemas options to include refs (#27)
  Add option to have info buttons (#24)
  Implemented template support for 'rel' property on href's schema #606 (#17)
  Update multiple.js (#21)
  Fixed to expand refs before creating root editor (#18)
  fix for issue 627 - selectize dropdown causes prop to dissapear - and issue 538 - create hardcoded to true (#19)
  Issue 488 fix disabled fields get enabled when using properties dropdown (#22)
  Resolved merge conflicts
  update submitted json when editing select fields via json manually to (#29)
  Copy Array Element Button (#4)
  Cleaning with innerHTML='' causes issues on IE. So clean children one by one with removeChild (#11)
  use hasOwnProperty instead of requiring a "true" value for startval (#30)
  added check for whether label is defined for checkbox (#8)
  Respect "minimum"/"maximum" and "exclusiveMinimum/Maximum" (#7)
  Undefined variable issue when using template (#15)
  Fix typo (#31)
  Fix for crash given schema {"enum":[null]} (#26)
  add option for lodash templates (#5)
  ...
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.

1 participant