Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable placeholder in CharField #896

Open
jumbosushi opened this issue Nov 5, 2018 · 0 comments
Open

Enable placeholder in CharField #896

jumbosushi opened this issue Nov 5, 2018 · 0 comments

Comments

@jumbosushi
Copy link
Contributor

jumbosushi commented Nov 5, 2018

Right now CharField data is used to render Template's char field placeholder (passed template.field.label in props to placeholder field):

image

Would be nice to enable the field to store placeholder info so we can show an example of how the field should be written:

image

Places to start

  1. Allow CharField class on Django to store placeholder info as well around this code
  2. 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)} />
  )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant