Giter VIP home page Giter VIP logo

reactinlineedit's Issues

Validation failure callback

I'd like to make a feature request -- when the validation fails, there should be an option to supply a callback to handle that failure and update the UI appropriately. I don't think this would be too complicated to add.

Thoughts??

Allow number type

When I use number in the props 'text' of the InlineEdit component, I have this error "Invalid prop text of type number supplied to InlineEdit, expected string". Is it possible to allow number type ? Thx !

Ability to Edit Inline with custom elements

More of a feature request than anything, and I am currently working on it, but I would like the ability to specify a custom element using the "editingElement" prop. I can create a pull request for this once my fork is working. Just wanted to give @kaivi a heads up and if this functionality is already possible, please let me know

automatically focusing on InlineEdit field

I'd like to have the browser automatically focus on the InlineEdit field to make it more obvious to the user that the field is editable.

Using React's built-in autoFocus param does not work:
<InlineEdit autoFocus text="Untitled Project" paramName="title" change={editTitle} />.

For now I'm using a compromise by finding the specific DOMNode on componentDidMount:

componentDidMount() {
    ReactDOM.findDOMNode(this.refs.title).focus();
}
render() {
    const {editTitle} = this.props;
    return (
        <InlineEdit ref="title" text="Untitled Project" paramName="title" change={editTitle} />
    )
}

While the workaround isn't necessarily difficult to implement, I'd prefer the InlineEdit component be compatible with autoFocus. No worries if this is too difficult to implement, huge fan of this library otherwise!

Ability to specify non-editing element

Currenty the non-editing element is a span. It would be nice if we could specify the element to use. For example, use a p or a div for the non-editing element.

Option to disable spellcheck

Would like to disable spellcheck as shown below:

screen shot 2017-10-23 at 5 25 38 pm

As this post shows, there is no way to turn off spellcheck via CSS. Is there a way to pass down props directly to the input element?

Successor project ?

Hey!

Seeking for inline edit with more capabilities, I found what I need in your new project,
Any chance to expose its current early stage ? (End of feb is too late and i'm the other alternatives are not nice as yours!)

Thanks! =)

Programmatically enter edit mode?

Hi,

Is it possible to programmatically enter edit mode?
That is, I don't want a click to enter edit mode, rather I want the click to propagate to the parent, and not be handled by the <InlineEdit> component. And The parent component will decide when to go into edit mode.

If not, I think it will make a good addition.
For example when the label is on a button, and clicking the button does something, but pressing Shift+click will go into edit mode.

Thanks,
Erez

Inline editing with a textarea

Inline editing via a textarea and would have enter/return add a new line vs change editing state. Is there way to do that?

support inpu type date

its waiting values as a string format
other hand, i i want to set editingElement input[type="date"], console get error
Uncaught Error: Invalid tag: input[type="date"]

Disabled feature?

Is there any way to set the InlineEdit to disabled so that the user may no longer edit the field?

minLength and maxLength doesn't work

Assigning these values doesn't have impact on the output input...
My code looks like this:

<InlineEdit className="great-class-name"
                   text={someDefaultValue}
                   activeClassName="some-input"
                   paramName={'value'}
                   minLength={1}
                   maxLength={5}
                   validate={this._someFunc.bind(this)}
                   change={this._someFunc.bind(this)} />

Bug: demo does not working

Error: index.js:293 Uncaught SyntaxError: Unexpected token <<

System: Linux Mint
Browser: last Google Chrome

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.