dispatch
dispatch copied to clipboard
Enable placeholder in CharField
Right now CharField
data is used to render Template's char field placeholder (passed template.field.label
in props to placeholder
field):
Would be nice to enable the field to store placeholder info so we can show an example of how the field should be written:
Places to start
- Allow
CharField
class on Django to storeplaceholder
info as well around this code - Edit the
CharField
component on React to render this new placeholder in this file to be something like
export default function CharField(props) {
return (
<TextInput
placeholder={props.field.placeholder}
value={props.data || ''}
fill={true}
onChange={e => props.onChange(e.target.value)} />
)
}