{"action":"opened","issue":{"url":"https://api.github.com/repos/erikras/redux-form/issues/1634","repository_url":"https://api.github.com/repos/erikras/redux-form","labels_url":"https://api.github.com/repos/erikras/redux-form/issues/1634/labels{/name}","comments_url":"https://api.github.com/repos/erikras/redux-form/issues/1634/comments","events_url":"https://api.github.com/repos/erikras/redux-form/issues/1634/events","html_url":"https://github.com/erikras/redux-form/issues/1634","id":173548491,"number":1634,"title":"[v6] Support custom meta props?","user":{"login":"smirea","id":544097,"avatar_url":"https://avatars.githubusercontent.com/u/544097?v=3","gravatar_id":"","url":"https://api.github.com/users/smirea","html_url":"https://github.com/smirea","followers_url":"https://api.github.com/users/smirea/followers","following_url":"https://api.github.com/users/smirea/following{/other_user}","gists_url":"https://api.github.com/users/smirea/gists{/gist_id}","starred_url":"https://api.github.com/users/smirea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smirea/subscriptions","organizations_url":"https://api.github.com/users/smirea/orgs","repos_url":"https://api.github.com/users/smirea/repos","events_url":"https://api.github.com/users/smirea/events{/privacy}","received_events_url":"https://api.github.com/users/smirea/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-26T21:36:44Z","updated_at":"2016-08-26T21:36:44Z","closed_at":null,"body":"Use-Case: apart from the existing flags (dirty, touched, ...) i'd like to implement my own custom state `highlighted` to globally highlight fields based on interaction. \r\n\r\nI've tried using a separate `highlighted: {}` state in the form, but mimicking the tree anywhere else is clumsy. Changing the value of the input is also not ideal (aka from `foo: String` to `foo: {value: String, highlighted: Bool}`) since that requires changing the signature of the model, which, more often than not, is based on a database object\r\n\r\nIdeally the interaction would be:\r\n\r\n```\r\ncombineReducers: {\r\n    form: form.plugin((state, action) => {\r\n        if (action.type !== 'highlight') return state;\r\n            return {\r\n                    ...state,\r\n                    fields: {\r\n                        ...state.fields,\r\n                        [action.meta.field]: {\r\n                            ...state.fields[action.meta.field],\r\n                            highlighted: action.value,\r\n                        },\r\n                    },\r\n                };\r\n    })\r\n}\r\n```\r\n\r\nand in my component:\r\n\r\n```\r\n<Field name='foo' component={render} />\r\n\r\nrender = ({input, meta: {highlighted}}) => \r\n     <div style={highlighted ? 'fancy' : null}><input {...input} /></div>\r\n```\r\n\r\nbut that's not available since the meta props are hand-picked and hardcoded.\r\n\r\n**TL; DR:** what do you think of adding `...state` on line https://github.com/erikras/redux-form/blob/master/src/createFieldProps.js#L68 to enable user defined meta props"}}
{"actor":{"display_login":"smirea"}}