{"action":"created","issue":{"url":"https://api.github.com/repos/ASIDataScience/dash-bootstrap-components/issues/117","repository_url":"https://api.github.com/repos/ASIDataScience/dash-bootstrap-components","labels_url":"https://api.github.com/repos/ASIDataScience/dash-bootstrap-components/issues/117/labels{/name}","comments_url":"https://api.github.com/repos/ASIDataScience/dash-bootstrap-components/issues/117/comments","events_url":"https://api.github.com/repos/ASIDataScience/dash-bootstrap-components/issues/117/events","html_url":"https://github.com/ASIDataScience/dash-bootstrap-components/pull/117","id":394461521,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxMjAzNjcx","number":117,"title":"[WIP] Add Textarea component","user":{"login":"tcbegley","id":15220906,"node_id":"MDQ6VXNlcjE1MjIwOTA2","avatar_url":"https://avatars1.githubusercontent.com/u/15220906?v=4","gravatar_id":"","url":"https://api.github.com/users/tcbegley","html_url":"https://github.com/tcbegley","followers_url":"https://api.github.com/users/tcbegley/followers","following_url":"https://api.github.com/users/tcbegley/following{/other_user}","gists_url":"https://api.github.com/users/tcbegley/gists{/gist_id}","starred_url":"https://api.github.com/users/tcbegley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcbegley/subscriptions","organizations_url":"https://api.github.com/users/tcbegley/orgs","repos_url":"https://api.github.com/users/tcbegley/repos","events_url":"https://api.github.com/users/tcbegley/events{/privacy}","received_events_url":"https://api.github.com/users/tcbegley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-27T18:34:28Z","updated_at":"2018-12-27T19:09:41Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/ASIDataScience/dash-bootstrap-components/pulls/117","html_url":"https://github.com/ASIDataScience/dash-bootstrap-components/pull/117","diff_url":"https://github.com/ASIDataScience/dash-bootstrap-components/pull/117.diff","patch_url":"https://github.com/ASIDataScience/dash-bootstrap-components/pull/117.patch"},"body":"This PR adds a `Textarea` component that, much like the `Input` component, behaves like its analogue in `dash-core-components`, but adds Bootstrap styling, thereby addressing #116.\r\n\r\nIt also adds some basic documentation to the Input section of the docs page."},"comment":{"url":"https://api.github.com/repos/ASIDataScience/dash-bootstrap-components/issues/comments/450212162","html_url":"https://github.com/ASIDataScience/dash-bootstrap-components/pull/117#issuecomment-450212162","issue_url":"https://api.github.com/repos/ASIDataScience/dash-bootstrap-components/issues/117","id":450212162,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDIxMjE2Mg==","user":{"login":"tcbegley","id":15220906,"node_id":"MDQ6VXNlcjE1MjIwOTA2","avatar_url":"https://avatars1.githubusercontent.com/u/15220906?v=4","gravatar_id":"","url":"https://api.github.com/users/tcbegley","html_url":"https://github.com/tcbegley","followers_url":"https://api.github.com/users/tcbegley/followers","following_url":"https://api.github.com/users/tcbegley/following{/other_user}","gists_url":"https://api.github.com/users/tcbegley/gists{/gist_id}","starred_url":"https://api.github.com/users/tcbegley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcbegley/subscriptions","organizations_url":"https://api.github.com/users/tcbegley/orgs","repos_url":"https://api.github.com/users/tcbegley/repos","events_url":"https://api.github.com/users/tcbegley/events{/privacy}","received_events_url":"https://api.github.com/users/tcbegley/received_events","type":"User","site_admin":false},"created_at":"2018-12-27T19:09:41Z","updated_at":"2018-12-27T19:09:41Z","author_association":"COLLABORATOR","body":"This can be tested with prerelease `0.2.7rc1`. I used the following simple app to try things out and it seems to be working well so far.\r\n\r\n```python\r\nimport dash\r\nimport dash_bootstrap_components as dbc\r\nimport dash_html_components as html\r\nfrom dash.dependencies import Input, Output\r\n\r\napp = dash.Dash(external_stylesheets=[dbc.themes.BOOTSTRAP])\r\n\r\napp.layout = dbc.Container(\r\n    [\r\n        dbc.FormGroup(\r\n            [\r\n                dbc.Label(\"Regular\"),\r\n                dbc.Textarea(id=\"default\"),\r\n                dbc.FormText(\"No default styles\"),\r\n                html.P(id=\"default-output\"),\r\n            ]\r\n        ),\r\n        dbc.FormGroup(\r\n            [\r\n                dbc.Label(\"Small\"),\r\n                dbc.Textarea(id=\"small\", bs_size=\"sm\"),\r\n                dbc.FormText(\"Small sized text area\"),\r\n                html.P(id=\"small-output\"),\r\n            ]\r\n        ),\r\n        dbc.FormGroup(\r\n            [\r\n                dbc.Label(\"Large\"),\r\n                dbc.Textarea(id=\"large\", bs_size=\"lg\"),\r\n                dbc.FormText(\"Large sized textarea\"),\r\n                html.P(id=\"large-output\"),\r\n            ]\r\n        ),\r\n        dbc.FormGroup(\r\n            [\r\n                dbc.Label(\"Valid\"),\r\n                dbc.Textarea(id=\"valid\"),\r\n                dbc.FormText(\"Type at least one character\"),\r\n                dbc.FormFeedback(\"You typed a thing!\", valid=True),\r\n            ]\r\n        ),\r\n        dbc.FormGroup(\r\n            [\r\n                dbc.Label(\"Invalid\"),\r\n                dbc.Textarea(id=\"invalid\"),\r\n                dbc.FormText(\"Don't type anything\"),\r\n                dbc.FormFeedback(\"I said don't type anything!\"),\r\n            ]\r\n        ),\r\n    ]\r\n)\r\n\r\n\r\ndef return_text(text):\r\n    return text\r\n\r\n\r\napp.callback(\r\n    Output(\"default-output\", \"children\"), [Input(\"default\", \"value\")]\r\n)(return_text)\r\napp.callback(Output(\"small-output\", \"children\"), [Input(\"small\", \"value\")])(\r\n    return_text\r\n)\r\napp.callback(Output(\"large-output\", \"children\"), [Input(\"large\", \"value\")])(\r\n    return_text\r\n)\r\n\r\n\r\n@app.callback(Output(\"valid\", \"valid\"), [Input(\"valid\", \"value\")])\r\ndef set_valid(text):\r\n    if text:\r\n        return True\r\n    return False\r\n\r\n\r\n@app.callback(Output(\"invalid\", \"invalid\"), [Input(\"invalid\", \"value\")])\r\ndef set_invalid(text):\r\n    if text:\r\n        return True\r\n    return False\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    app.run_server(debug=True)\r\n\r\n```"}}
{"actor":{"display_login":"tcbegley"}}