{"id":17189647,"url":"https://github.com/andreivictor/select2-dropdownposition","last_synced_at":"2025-04-13T19:24:34.689Z","repository":{"id":37561874,"uuid":"119083932","full_name":"andreivictor/select2-dropdownPosition","owner":"andreivictor","description":"Extends Select2 plugin by adding an option to set the position of the dropdown","archived":false,"fork":false,"pushed_at":"2022-08-30T17:19:50.000Z","size":4,"stargazers_count":17,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T10:06:54.416Z","etag":null,"topics":["select2"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreivictor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-26T17:48:26.000Z","updated_at":"2025-03-10T20:27:34.000Z","dependencies_parsed_at":"2022-08-08T21:00:10.224Z","dependency_job_id":null,"html_url":"https://github.com/andreivictor/select2-dropdownPosition","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreivictor%2Fselect2-dropdownPosition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreivictor%2Fselect2-dropdownPosition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreivictor%2Fselect2-dropdownPosition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreivictor%2Fselect2-dropdownPosition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreivictor","download_url":"https://codeload.github.com/andreivictor/select2-dropdownPosition/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248766765,"owners_count":21158314,"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":["select2"],"created_at":"2024-10-15T01:12:09.125Z","updated_at":"2025-04-13T19:24:34.636Z","avatar_url":"https://github.com/andreivictor.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# select2 - 'dropdownPosition' option\n\nExtends Select2 v4 plugin by adding an option to set the position of the dropdown.\n\n\n## Description ##\nSelect2 automatically places the dropdown, either above or below the element.\nIn some cases (e.g. mobile devices) it can be a better experience to force the dropdown to a certain position.\n\nThis feature was already discussed in the official plugin repository (https://github.com/select2/select2/issues/2710), but hasn't been included yet.\n\nThe new `dropdownPosition` can take the following values:\n\n - `auto` (default) - it uses the old behavior, placing the dropdown either above or below the element, depending on available space,\n - `below` - the dropdown is always displayed below the element;\n - `above` - the dropdown is always displayed above the element.\n \n \n ## Setup ##\nInclude the script after Select2 main javascript file:\n```html\n\u003cscript src=\"select2.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"select2-dropdownPosition.js\"\u003e\u003c/script\u003e\n```\n\n## Usage ##\nInitialize the select2 plugin with the `dropdownPosition` option set to `above` or `below`:\n\n```javascript\n$(\"select\").select2({\n    // other options \n    dropdownPosition: 'below'\n});\n```\n\n\n## Demo ##\nDemo available on [JsFiddle](https://jsfiddle.net/byxj73ov/). \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreivictor%2Fselect2-dropdownposition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreivictor%2Fselect2-dropdownposition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreivictor%2Fselect2-dropdownposition/lists"}