{"id":15180487,"url":"https://github.com/mdbootstrap/react-select-with-custom-input","last_synced_at":"2026-02-15T19:32:00.788Z","repository":{"id":57833016,"uuid":"528319694","full_name":"mdbootstrap/react-select-with-custom-input","owner":"mdbootstrap","description":"Responsive React Select with custom user input built with Bootstrap 5. Click on the Other option to input a custom value into the select.","archived":false,"fork":false,"pushed_at":"2022-08-24T08:17:15.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-17T09:10:10.461Z","etag":null,"topics":["bootstrap","bootstrap-input","bootstrap-react","bootstrap-select","bootstrap-template","bootstrap-theme","bootstrap5","css","jsx","react","react-input","react-select"],"latest_commit_sha":null,"homepage":"https://mdbootstrap.com/docs/react/extended/select-with-custom-input/","language":null,"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/mdbootstrap.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":"2022-08-24T07:49:19.000Z","updated_at":"2022-08-24T08:16:58.000Z","dependencies_parsed_at":"2022-09-01T04:30:38.157Z","dependency_job_id":null,"html_url":"https://github.com/mdbootstrap/react-select-with-custom-input","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mdbootstrap/react-select-with-custom-input","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdbootstrap%2Freact-select-with-custom-input","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdbootstrap%2Freact-select-with-custom-input/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdbootstrap%2Freact-select-with-custom-input/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdbootstrap%2Freact-select-with-custom-input/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdbootstrap","download_url":"https://codeload.github.com/mdbootstrap/react-select-with-custom-input/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdbootstrap%2Freact-select-with-custom-input/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29487450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T19:29:10.908Z","status":"ssl_error","status_checked_at":"2026-02-15T19:29:10.419Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bootstrap","bootstrap-input","bootstrap-react","bootstrap-select","bootstrap-template","bootstrap-theme","bootstrap5","css","jsx","react","react-input","react-select"],"created_at":"2024-09-27T16:20:50.455Z","updated_at":"2026-02-15T19:32:00.771Z","avatar_url":"https://github.com/mdbootstrap.png","language":null,"readme":"Responsive React Select with custom user input built with Bootstrap 5. Click on the Other option to input a custom value into the select.\n\nCheck out [React Bootstrap Select With Custom Input Documentation](https://mdbootstrap.com/docs/react/extended/select-with-custom-input/) for detailed instructions \u0026 even more examples.\n\n## Basic example\n\n![React Bootstrap 5 Select With Custom Input](/assets/basic.png)\n\n```js\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { MDBContainer, MDBInput, MDBSelect } from \"mdb-react-ui-kit\";\n\nexport default function App() {\n  const data = useMemo(\n    () =\u003e [\n      { text: \"One\", value: 1 },\n      { text: \"Two\", value: 2 },\n      { text: \"Three\", value: 3 },\n      { text: \"Four\", value: 4 },\n      { text: \"Other\", value: 5 },\n    ],\n    []\n  );\n\n  const [currentValue, setCurrentValue] = useState(data[0]);\n  const [inputActive, setInputActive] = useState(false);\n\n  const otherInputEl = useRef(null);\n\n  const inputOnBlur = useCallback((e) =\u003e {\n    if (!e.target.value) {\n      setInputActive(false);\n      setCurrentValue(data[data.length - 1])\n    }\n  }, []);\n\n  useEffect(() =\u003e {\n    console.log(currentValue);\n    const lastIndex = data.length - 1;\n    if (currentValue.value == data[lastIndex].value) {\n      setInputActive(true);\n      setTimeout(() =\u003e {\n        otherInputEl.current?.focus();\n      });\n    } else {\n      setInputActive(false);\n    }\n  }, [currentValue]);\n\n  return (\n    \u003cMDBContainer style={{ width: \"300px\" }} className=\"mt-5\"\u003e\n      {inputActive ? (\n        \u003cMDBInput onBlur={inputOnBlur} inputRef={otherInputEl} label=\"Other\" id=\"form1\" type=\"text\" /\u003e\n      ) : (\n        \u003cMDBSelect\n          onValueChange={(e) =\u003e setCurrentValue(e)}\n          label=\"Example label\"\n          data={data}\n        /\u003e\n      )}\n    \u003c/MDBContainer\u003e\n  );\n}\n```\n\n\n## How to use?\n\n1. Download MDB React - free UI KIT\n\n2. Choose your favourite customized component and click on the image\n\n3. Copy \u0026 paste the code into your MDB project\n\n[▶️ Subscribe to YouTube channel for web development tutorials \u0026 resources](https://www.youtube.com/MDBootstrap?sub_confirmation=1)\n\n___\n\n## More extended Bootstrap documentation\n\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"https://mdbootstrap.com/docs/react/extended/multiselect/\"\u003eReact multiselect\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://mdbootstrap.com/docs/react/forms/select/\"\u003eReact select\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://mdbootstrap.com/docs/react/forms/overview/\"\u003eReact forms\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://mdbootstrap.com/docs/react/forms/input-fields/\"\u003eReact input fields\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdbootstrap%2Freact-select-with-custom-input","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdbootstrap%2Freact-select-with-custom-input","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdbootstrap%2Freact-select-with-custom-input/lists"}