giorgosart / react-easy-edit

Inline editing library for React
https://giorgosart.gitbook.io/react-easy-edit/
MIT License
251 stars 45 forks source link

editMode is not working in version 2.0.0 #204

Closed spacecat closed 2 weeks ago

spacecat commented 2 weeks ago

I have created a new next.js app by using npx create-next-app@latest and then I added this:

"use client";

import EasyEdit, { Types } from "react-easy-edit";

export default function Home() {
  const save = (value: string) => {
    console.log(value);
  };
  const cancel = () => {
    console.log("Cancelled");
  };

  return (
    <div>
      <main>
        <EasyEdit
          type={Types.TEXT}
          onSave={save}
          onCancel={cancel}
          saveButtonLabel="Save Me"
          cancelButtonLabel="Cancel Me"
          attributes={{ name: "awesome-input", id: 1 }}
          instructions="Star this repo!"
          editMode={true}
        />
      </main>
    </div>
  );
}

but it's not working. I'm expecting the textbox to become editable when I have editMode set to true. Any ideas?

spacecat commented 2 weeks ago

Oh, I see... the property was changed to isEditing.

https://github.com/giorgosart/react-easy-edit/pull/202