Material-ui: new component Editable label

Created on 2 Mar 2020  路  1Comment  路  Source: mui-org/material-ui

Hey there, I've created a new component that you can click into a label and its render a editable inline input for the label.

it is important when you want to edit a title component without use a dialog or whatever component thats block user actions.

example:

function Demo() {
  const [text, setText] = useState("Click here to edit.");

  return (
    <div className="app">
      <MuiEditableLabel
        value={text}
        onChange={e => setText(e.target.value)}
        onFocus={t => console.log("focus", t)}
        onFocusOut={t => console.log("focus out", t)}
      />
    </div>
  );
}

see here: https://github.com/roxdavirox/mui-editable-label

please, fell free to contribute.

Most helpful comment

Thanks for sharing. Once this gets more adoption we'll consider adding it to the core.

>All comments

Thanks for sharing. Once this gets more adoption we'll consider adding it to the core.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iamzhouyi picture iamzhouyi  路  3Comments

FranBran picture FranBran  路  3Comments

mattmiddlesworth picture mattmiddlesworth  路  3Comments

ghost picture ghost  路  3Comments

finaiized picture finaiized  路  3Comments