Giter VIP home page Giter VIP logo

Comments (3)

luda-dev avatar luda-dev commented on May 25, 2024

是类似这样的么?
image
image
如果是这样的话, 你可以自定义编辑组件具体可以参考 文档

from vtable.

mmmaomao21 avatar mmmaomao21 commented on May 25, 2024

是类似这样的么? image image 如果是这样的话, 你可以自定义编辑组件具体可以参考 文档

嗯这个我已经试过了,只能插入原生dom,我的诉求应该和#890 是一样的 希望可以插入一些class类、组件等

from vtable.

martesi avatar martesi commented on May 25, 2024

目前 react-vtable 还没有直接提供这样的功能,不过如 @luda-dev 提到的那样,你可以间接地使用这样的功能,比如像 #1005 里面一样在 onStart(aka beginEdit)时创建你需要的编辑器。不过这个例子里的代码需要进行一些调整:

  • 如果你需要消费 context,你应该使用 createPortal 而不是新建一个 root 节点
  • 如果你使用了 createRoot,你应该在 endEdit 时调用 root 上的 unmount 来释放资源
  • 如果你使用 react 18-,你应该调用 render 并使用 unmountComponentAtNode 来释放资源

如果 react-vtable 需要添加这样的支持的话,你希望 API 是什么样呢?

from vtable.

Related Issues (20)

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.