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

default value in plugin schema only has effect if plugin form is changed #771

Closed
macrozone opened this issue Feb 3, 2020 · 1 comment
Closed
Assignees
Labels

Comments

@macrozone
Copy link
Collaborator

Describe the bug

default: "xxx" in a schema of a plugin does show that value in the generated form, but unless any property is changed, it won't update the node

To Reproduce

e.g

import { createContentPlugin } from "@react-page/create-plugin-materialui";
import React from "react";

export default createContentPlugin<{
  title: string;
}>({
  Renderer: ({ state }) => {
    return <SomeComponen title={state.title} />;
  },
  name: "someplugin",
  version: "0.0.1",
  text: "Some plugin",
  schema: {
    required: ["title"],
    properties: {
      title: {
        type: "string",
        default: "Some Default Title",
      },

    },
  },
});

Expected behavior

it should add the plugin with all default values

@macrozone macrozone added the bug label Feb 3, 2020
@macrozone macrozone self-assigned this Feb 3, 2020
@macrozone
Copy link
Collaborator Author

fixed!

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

No branches or pull requests

1 participant