{"id":15894484,"url":"https://github.com/rusty1s/dependent-select-boxes","last_synced_at":"2025-04-02T18:22:25.020Z","repository":{"id":94688509,"uuid":"55602204","full_name":"rusty1s/dependent-select-boxes","owner":"rusty1s","description":"Allows a child select box to change its options dependent on its parent select box","archived":false,"fork":false,"pushed_at":"2017-08-18T07:18:53.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-10T10:04:36.892Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://rusty1s.github.io/dependent-select-boxes/demo","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rusty1s.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-06T12:01:43.000Z","updated_at":"2022-02-10T17:49:55.000Z","dependencies_parsed_at":"2023-03-08T07:45:33.115Z","dependency_job_id":null,"html_url":"https://github.com/rusty1s/dependent-select-boxes","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"28dde8aee64f6b1f293a6bdc4ca694c910138a7f"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rusty1s%2Fdependent-select-boxes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rusty1s%2Fdependent-select-boxes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rusty1s%2Fdependent-select-boxes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rusty1s%2Fdependent-select-boxes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rusty1s","download_url":"https://codeload.github.com/rusty1s/dependent-select-boxes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246866422,"owners_count":20846569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-06T08:40:23.466Z","updated_at":"2025-04-02T18:22:24.994Z","avatar_url":"https://github.com/rusty1s.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dependent-select-boxes\n\n`dependent-select-boxes` allows a child select box to change its options dependent on its parent select box.\n\n[Demo](http://rusty1s.github.io/dependent-select-boxes/demo)\n\n## Additional options\n\nYou can pass in options as a third parameter. The currently supported options are:\n\n* `childOptionIsDependentOnParentOption(childOption, parentOption)`:\nFunction that determines if the `childOption`should be displayed if\n`parentOption` is selected. Default: `true` if the value of the parent\noption is a prefix of the value of the child option, else `false`.\n* `resetParentOptionOnEmptyChildOption`:\nResets the parent option to an empty value if the child option changes\nto an empty option. Default `true`.\n\n```js\nnew DependentSelectBoxes(document.getElementById('parent'), document.getElementById('child'), {\n  childOptionIsDependentOnParentOption(childOption, parentOption) {\n    ...\n  },\n  resetParentOptionOnEmptyChildOption: false,\n});\n```\n\nYou can configure the default options by setting them via:\n\n```js\nimport { setDefaultOptions } from 'dependent-select-boxes';\n\nsetDefaultOptions({\n  ...\n});\n```\n\n## Node\n\n```js\n// npm install dependent-select-boxes --save\nimport DependentSelectBoxes from 'dependent-select-boxes';\n\nconst dependentSelectBoxes = new DependentSelectBoxes(parent, child, options);\n```\n\n## Contributing\n\nIf you would like to [submit a pull request](https://github.com/rusty1s/dependent-select-boxes/pulls)\nwith any changes you make, please feel free!\nSimply run `npm test` to test and `npm start` to compile before submitting pull requests.\n\n## Issues\n\nPlease use the [GitHub issue tracker](https://github.com/rusty1s/dependent-select-boxes/issues)\nto raise any problems or feature requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frusty1s%2Fdependent-select-boxes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frusty1s%2Fdependent-select-boxes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frusty1s%2Fdependent-select-boxes/lists"}