{"action":"created","issue":{"url":"https://api.github.com/repos/reactjs/react-router/issues/3661","repository_url":"https://api.github.com/repos/reactjs/react-router","labels_url":"https://api.github.com/repos/reactjs/react-router/issues/3661/labels{/name}","comments_url":"https://api.github.com/repos/reactjs/react-router/issues/3661/comments","events_url":"https://api.github.com/repos/reactjs/react-router/issues/3661/events","html_url":"https://github.com/reactjs/react-router/issues/3661","id":166853419,"number":3661,"title":"Allow <Link> to have a custom logic for active state","user":{"login":"smashercosmo","id":273283,"avatar_url":"https://avatars.githubusercontent.com/u/273283?v=3","gravatar_id":"","url":"https://api.github.com/users/smashercosmo","html_url":"https://github.com/smashercosmo","followers_url":"https://api.github.com/users/smashercosmo/followers","following_url":"https://api.github.com/users/smashercosmo/following{/other_user}","gists_url":"https://api.github.com/users/smashercosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/smashercosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smashercosmo/subscriptions","organizations_url":"https://api.github.com/users/smashercosmo/orgs","repos_url":"https://api.github.com/users/smashercosmo/repos","events_url":"https://api.github.com/users/smashercosmo/events{/privacy}","received_events_url":"https://api.github.com/users/smashercosmo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-07-21T15:47:49Z","updated_at":"2016-07-23T18:30:02Z","closed_at":"2016-07-21T23:03:58Z","body":"Along with @taion's purposal https://github.com/reactjs/react-router/issues/3657, I suggest to also allow <Link> component to have a prop, which accepts function for implementing custom isActive logic. It could look something like this\r\n\r\n```jsx\r\n<Link \r\n  to=\"/hello\"\r\n  isActive={location => location.pathname === '/hello'} \r\n  activeClassName=\"active\">\r\n  Hello\r\n</Link>\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/reactjs/react-router/issues/comments/234733002","html_url":"https://github.com/reactjs/react-router/issues/3661#issuecomment-234733002","issue_url":"https://api.github.com/repos/reactjs/react-router/issues/3661","id":234733002,"user":{"login":"tachang","id":85011,"avatar_url":"https://avatars.githubusercontent.com/u/85011?v=3","gravatar_id":"","url":"https://api.github.com/users/tachang","html_url":"https://github.com/tachang","followers_url":"https://api.github.com/users/tachang/followers","following_url":"https://api.github.com/users/tachang/following{/other_user}","gists_url":"https://api.github.com/users/tachang/gists{/gist_id}","starred_url":"https://api.github.com/users/tachang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tachang/subscriptions","organizations_url":"https://api.github.com/users/tachang/orgs","repos_url":"https://api.github.com/users/tachang/repos","events_url":"https://api.github.com/users/tachang/events{/privacy}","received_events_url":"https://api.github.com/users/tachang/received_events","type":"User","site_admin":false},"created_at":"2016-07-23T18:30:02Z","updated_at":"2016-07-23T18:30:02Z","body":"@taion Can you elaborate on \"we ignore query parameters in active calculations, except to verify that the ones specified are a subset of the ones that are active.\"\r\n\r\nI am changing the query string via \r\n\r\n```\r\n    self.props.router.replace({\r\n      'pathname': window.location.pathname,\r\n      'query': self.state.filterValues\r\n    });\r\n```\r\n\r\nAnd the Link I have is \r\n\r\n```\r\n<Link to={`${Constants.APP_URL_PREFIX}/dashboard?${this.state.filterQueryString}`} activeClassName=\"active\" >Dashboard</Link>\r\n```\r\n\r\nBut the active class is not being set. The URL in my Chrome browser is exactly the same as if I were to right click and do copy link."}}
{"actor":{"display_login":"tachang"}}