{"action":"created","issue":{"url":"https://api.github.com/repos/cloudwan/gohan/issues/46","labels_url":"https://api.github.com/repos/cloudwan/gohan/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/cloudwan/gohan/issues/46/comments","events_url":"https://api.github.com/repos/cloudwan/gohan/issues/46/events","html_url":"https://github.com/cloudwan/gohan/issues/46","id":118416316,"number":46,"title":"Show only child properties once selecting a parent object","user":{"login":"leifmadsen","id":768751,"avatar_url":"https://avatars.githubusercontent.com/u/768751?v=3","gravatar_id":"","url":"https://api.github.com/users/leifmadsen","html_url":"https://github.com/leifmadsen","followers_url":"https://api.github.com/users/leifmadsen/followers","following_url":"https://api.github.com/users/leifmadsen/following{/other_user}","gists_url":"https://api.github.com/users/leifmadsen/gists{/gist_id}","starred_url":"https://api.github.com/users/leifmadsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leifmadsen/subscriptions","organizations_url":"https://api.github.com/users/leifmadsen/orgs","repos_url":"https://api.github.com/users/leifmadsen/repos","events_url":"https://api.github.com/users/leifmadsen/events{/privacy}","received_events_url":"https://api.github.com/users/leifmadsen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cloudwan/gohan/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-23T16:19:01Z","updated_at":"2015-11-24T22:13:57Z","closed_at":"2015-11-24T22:13:57Z","body":"Ran into an issue where we're trying to show two drop downs on a page, one of them being a list of parent objects, and the other being the list of child objects to the parent.\r\n\r\nThe issue is that the second drop down doesn't have a way (that I've found) that allows you to show only child objects for the parent object in the other drop down. Here is an example:\r\n\r\nSo I have the following schemas:\r\n* Manufacturers\r\n  * Models\r\n  * Firmware (to be added)\r\n\r\nManufacturers is the parent to models (and firmware). When adding a Device to a Customer, the idea was that you would select the Manufacturer, the Model, and then the Firmware. The two dropdowns for Model and Firmware would be populated based on the Manufacturer that is selected.\r\n\r\nCurrently, all values in the child drop downs show.\r\n\r\n## Manufacturer\r\n```json\r\nproperties:\r\n  description:\r\n    description: Description\r\n    permission:\r\n      - create\r\n      - update\r\n    title: Description\r\n    type: string\r\n  id:\r\n    description: ID\r\n    permission:\r\n      - create\r\n    title: ID\r\n    type: string\r\n    view:\r\n      - detail\r\n  name:\r\n    description: Name\r\n    permission:\r\n      - create\r\n      - update\r\n    title: Name\r\n    type: string\r\n    unique: true\r\n  tenant_id:\r\n    description: Tenant ID\r\n    permission:\r\n      - create\r\n    title: Tenant ID\r\n    type: string\r\n    view:\r\n      - detail\r\npropertiesOrder:\r\n  - id\r\n  - name\r\n  - description\r\n  - tenant_id\r\nrequired: null\r\ntype: object\r\n```\r\n\r\n### Model\r\n```json\r\nproperties:\r\n  id:\r\n    description: ID\r\n    permission:\r\n      - create\r\n    title: ID\r\n    type: string\r\n    view:\r\n      - detail\r\n  manufacturer_id:\r\n    description: parent object\r\n    permission:\r\n      - create\r\n    relation: manufacturer\r\n    title: manufacturer\r\n    type: string\r\n    unique: false\r\n  name:\r\n    description: Name\r\n    permission:\r\n      - create\r\n      - update\r\n    title: Name\r\n    type: string\r\n  tenant_id:\r\n    description: Tenant ID\r\n    permission:\r\n      - create\r\n    title: Tenant ID\r\n    type: string\r\n    view:\r\n      - detail\r\npropertiesOrder:\r\n  - id\r\n  - name\r\n  - tenant_id\r\n  - manufacturer_id\r\nrequired:\r\n  - manufacturer_id\r\ntype: object\r\n```\r\n\r\n## Test Object with Manufacturer and Model\r\n```json\r\nproperties:\r\n  id:\r\n    description: ID\r\n    permission:\r\n      - create\r\n    title: ID\r\n    type: string\r\n    view:\r\n      - detail\r\n  manufacturer:\r\n    description: Manufacturer\r\n    permission:\r\n      - create\r\n      - update\r\n    relation: manufacturer\r\n    relation_property: manufacturer\r\n    title: Manufacturer\r\n    type: string\r\n  model:\r\n    description: Model\r\n    permission:\r\n      - create\r\n      - update\r\n    relation: model\r\n    relation_property: model\r\n    title: Model\r\n    type: string\r\n  tenant_id:\r\n    description: Tenant ID\r\n    permission:\r\n      - create\r\n    title: Tenant ID\r\n    type: string\r\n    view:\r\n      - detail\r\npropertiesOrder:\r\n  - id\r\n  - manufacturer\r\n  - model\r\n  - tenant_id\r\nrequired: null\r\ntype: object\r\n```"},"comment":{"url":"https://api.github.com/repos/cloudwan/gohan/issues/comments/159423127","html_url":"https://github.com/cloudwan/gohan/issues/46#issuecomment-159423127","issue_url":"https://api.github.com/repos/cloudwan/gohan/issues/46","id":159423127,"user":{"login":"nati","id":105922,"avatar_url":"https://avatars.githubusercontent.com/u/105922?v=3","gravatar_id":"","url":"https://api.github.com/users/nati","html_url":"https://github.com/nati","followers_url":"https://api.github.com/users/nati/followers","following_url":"https://api.github.com/users/nati/following{/other_user}","gists_url":"https://api.github.com/users/nati/gists{/gist_id}","starred_url":"https://api.github.com/users/nati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nati/subscriptions","organizations_url":"https://api.github.com/users/nati/orgs","repos_url":"https://api.github.com/users/nati/repos","events_url":"https://api.github.com/users/nati/events{/privacy}","received_events_url":"https://api.github.com/users/nati/received_events","type":"User","site_admin":false},"created_at":"2015-11-24T22:13:57Z","updated_at":"2015-11-24T22:13:57Z","body":"OK please open this issue again. it you have additional questions"}}