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

EditableCell should expose 'editableTextProps' #2815

Closed
Corey-Arneson opened this issue Aug 17, 2018 · 3 comments · Fixed by #3350
Closed

EditableCell should expose 'editableTextProps' #2815

Corey-Arneson opened this issue Aug 17, 2018 · 3 comments · Fixed by #3350

Comments

@Corey-Arneson
Copy link

Environment

  • Package version(s): blueprint/table: 3.1.0
  • Browser and OS versions: NA

Feature request

It would be very useful for our use cases (and from looking through the open issues, others as well) if the EditbleCell allowed for EditableText props to be passed down to use functionality such as placeholder, maxLength, multiline, maxLines, minLines, and default value. In complex editable grid scenarios, being able to tap into these existing behaviors of EditableText would be a massive timesaver and removes the need to create completely custom cell components in order to pass a single additional prop to the cell editor.

Examples

Support in a cell rendererer:

return (
    <EditableCell 
        key={key} 
        id={id} 
        value={value} 
        // This prop would be great to be able to pass
        editableTextProps={{ 
            maxLength: 255, 
            placeholder: 'Please enter a unique value',
        }}
    />
);
@giladgray
Copy link
Contributor

giladgray commented Aug 17, 2018

@Corey-Arneson yeah seems legit. happy to review a PR.

@giladgray
Copy link
Contributor

@Corey-Arneson (but so you're aware, this React table library is mostly dead in the water and we are working on a stupid-fast replacement)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@giladgray @Corey-Arneson and others