{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/nova-issues/issues/704","repository_url":"https://api.github.com/repos/laravel/nova-issues","labels_url":"https://api.github.com/repos/laravel/nova-issues/issues/704/labels{/name}","comments_url":"https://api.github.com/repos/laravel/nova-issues/issues/704/comments","events_url":"https://api.github.com/repos/laravel/nova-issues/issues/704/events","html_url":"https://github.com/laravel/nova-issues/issues/704","id":364397484,"node_id":"MDU6SXNzdWUzNjQzOTc0ODQ=","number":704,"title":"How to set html attributes to fields?","user":{"login":"bernhardh","id":642292,"node_id":"MDQ6VXNlcjY0MjI5Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/642292?v=4","gravatar_id":"","url":"https://api.github.com/users/bernhardh","html_url":"https://github.com/bernhardh","followers_url":"https://api.github.com/users/bernhardh/followers","following_url":"https://api.github.com/users/bernhardh/following{/other_user}","gists_url":"https://api.github.com/users/bernhardh/gists{/gist_id}","starred_url":"https://api.github.com/users/bernhardh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bernhardh/subscriptions","organizations_url":"https://api.github.com/users/bernhardh/orgs","repos_url":"https://api.github.com/users/bernhardh/repos","events_url":"https://api.github.com/users/bernhardh/events{/privacy}","received_events_url":"https://api.github.com/users/bernhardh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-27T10:03:26Z","updated_at":"2018-09-27T10:51:53Z","closed_at":null,"author_association":"NONE","body":"Let's say we have a textarea, but it should only be shown 2 row height. In HTML it would be `<textarea rows=\"2\" name=\"tworows\"></textarea>`. How to do this with nova?\r\n\r\nI know, I could do it with an css hack (something like `[name=\"tworows\"] {height: 50px;}`), but thats not a real solution."},"comment":{"url":"https://api.github.com/repos/laravel/nova-issues/issues/comments/425046438","html_url":"https://github.com/laravel/nova-issues/issues/704#issuecomment-425046438","issue_url":"https://api.github.com/repos/laravel/nova-issues/issues/704","id":425046438,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTA0NjQzOA==","user":{"login":"AegirLeet","id":33277331,"node_id":"MDQ6VXNlcjMzMjc3MzMx","avatar_url":"https://avatars3.githubusercontent.com/u/33277331?v=4","gravatar_id":"","url":"https://api.github.com/users/AegirLeet","html_url":"https://github.com/AegirLeet","followers_url":"https://api.github.com/users/AegirLeet/followers","following_url":"https://api.github.com/users/AegirLeet/following{/other_user}","gists_url":"https://api.github.com/users/AegirLeet/gists{/gist_id}","starred_url":"https://api.github.com/users/AegirLeet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AegirLeet/subscriptions","organizations_url":"https://api.github.com/users/AegirLeet/orgs","repos_url":"https://api.github.com/users/AegirLeet/repos","events_url":"https://api.github.com/users/AegirLeet/events{/privacy}","received_events_url":"https://api.github.com/users/AegirLeet/received_events","type":"User","site_admin":false},"created_at":"2018-09-27T10:51:53Z","updated_at":"2018-09-27T10:51:53Z","author_association":"NONE","body":"You'd have to modify _resources/js/components/Form/TextareaField.vue_ in your Nova sources and add it there:\r\n`:rows=\"field.rows\"`\r\nAnd also remove the `min-h-textarea` class and add something like `style=\"height: auto;\"` to prevent the field from using the default heights.\r\n\r\nThen pass `->withMeta(['rows' => 2])` to the Field.\r\n"}}
{"actor":{"display_login":"AegirLeet"}}