{"action":"created","issue":{"url":"https://api.github.com/repos/callemall/material-ui/issues/1659","labels_url":"https://api.github.com/repos/callemall/material-ui/issues/1659/labels{/name}","comments_url":"https://api.github.com/repos/callemall/material-ui/issues/1659/comments","events_url":"https://api.github.com/repos/callemall/material-ui/issues/1659/events","html_url":"https://github.com/callemall/material-ui/issues/1659","id":106690940,"number":1659,"title":"Attempting to Extend a component with JS6 style OOP","user":{"login":"rayman22201","id":665285,"avatar_url":"https://avatars.githubusercontent.com/u/665285?v=3","gravatar_id":"","url":"https://api.github.com/users/rayman22201","html_url":"https://github.com/rayman22201","followers_url":"https://api.github.com/users/rayman22201/followers","following_url":"https://api.github.com/users/rayman22201/following{/other_user}","gists_url":"https://api.github.com/users/rayman22201/gists{/gist_id}","starred_url":"https://api.github.com/users/rayman22201/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rayman22201/subscriptions","organizations_url":"https://api.github.com/users/rayman22201/orgs","repos_url":"https://api.github.com/users/rayman22201/repos","events_url":"https://api.github.com/users/rayman22201/events{/privacy}","received_events_url":"https://api.github.com/users/rayman22201/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/callemall/material-ui/labels/Feature%20Request","name":"Feature Request","color":"c7def8"},{"url":"https://api.github.com/repos/callemall/material-ui/labels/Wontfix","name":"Wontfix","color":"ffffff"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-16T03:22:37Z","updated_at":"2015-12-15T11:27:57Z","closed_at":"2015-12-15T11:27:57Z","body":"Essentially I want to modify some styles that are deeply nested inside the Drop Down Menu component.\r\n\r\nI am using Babel.js and the most idiomatic way to modify the component seemed to be to override the getStyles function.\r\n\r\nBut it does not work. And I am now a sad panda :crying_cat_face:\r\nAny ideas on why this does not work?\r\n\r\nThank you in advance for your help.\r\n\r\nI have the following toy example:\r\n```\r\nlet React = require('react');\r\nlet mui = require('material-ui');\r\n\r\nclass ScrollableDropDownMenu extends mui.DropDownMenu {\r\n    // Attempting to override getStyles with my own\r\n\tgetStyles() {\r\n\t\tconsole.log(\"styles\");\r\n\t\treturn super.styles();\r\n\t}\r\n\trender() {\r\n        // Is still the original function. My override is ignored.\r\n        // But in a weird twist, my render() override does work... \r\n\t\tconsole.log(this.getStyles());\r\n\t\treturn super.render();\r\n\t}\r\n}\r\nmodule.exports = ScrollableDropDownMenu;\r\n```\r\n\r\nEven when I try to do override the prototype the old fashioned way, it does not work:\r\n```\r\nvar ScrollableDropDownMenu = mui.DropDownMenu;\r\nvar oldGetStyles = mui.DropDownMenu.prototype.getStyles;\r\nScrollableDropDownMenu.prototype.getStyles = function() {\r\n  // This doesn't work either... :-(\r\n  console.log(\"styles\");\r\n  return oldGetStyles();\r\n};\r\n```"},"comment":{"url":"https://api.github.com/repos/callemall/material-ui/issues/comments/164735348","html_url":"https://github.com/callemall/material-ui/issues/1659#issuecomment-164735348","issue_url":"https://api.github.com/repos/callemall/material-ui/issues/1659","id":164735348,"user":{"login":"subjectix","id":8528759,"avatar_url":"https://avatars.githubusercontent.com/u/8528759?v=3","gravatar_id":"","url":"https://api.github.com/users/subjectix","html_url":"https://github.com/subjectix","followers_url":"https://api.github.com/users/subjectix/followers","following_url":"https://api.github.com/users/subjectix/following{/other_user}","gists_url":"https://api.github.com/users/subjectix/gists{/gist_id}","starred_url":"https://api.github.com/users/subjectix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/subjectix/subscriptions","organizations_url":"https://api.github.com/users/subjectix/orgs","repos_url":"https://api.github.com/users/subjectix/repos","events_url":"https://api.github.com/users/subjectix/events{/privacy}","received_events_url":"https://api.github.com/users/subjectix/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T11:27:57Z","updated_at":"2015-12-15T11:27:57Z","body":"We will not support inheritance. But we are working on improving customization."}}