Giter Site home page Giter Site logo

Comments (8)

MadSpindel avatar MadSpindel commented on June 4, 2024 1

Yes, thank you @cwhite-connectfirst! I will release this as v2.0.0

from quill-mention.

MadSpindel avatar MadSpindel commented on June 4, 2024

Ping @cwhite-connectfirst

from quill-mention.

cwhite-connectfirst avatar cwhite-connectfirst commented on June 4, 2024

@webmarket7 good catch. I'll submit a PR for this shortly.

from quill-mention.

cwhite-connectfirst avatar cwhite-connectfirst commented on June 4, 2024

@MadSpindel Just curious - was there an intent to support a custom renderList function? I see that we're storing a bound reference to renderList on the options object (https://github.com/afconsult/quill-mention/blob/master/src/quill.mention.js#L29). It doesn't seem like that was the case, but I wanted to check with you first. renderList isn't mentioned in the documentation as a valid option right now. Also, if a custom renderList function is supposed to be a supported feature, it's not working correctly right now, since we're not referencing the renderList function stored on the options object when calling source (https://github.com/afconsult/quill-mention/blob/master/src/quill.mention.js#L244).

Personally, I don't think it makes much sense to let users override the renderList function with their own definition, since renderList is responsible for modifying instance properties. I'm going to submit this PR with renderList removed from the options object, but if you think it should be a valid option, let me know and I can revert that change from my PR.

EDIT: Just realized why we're attaching renderList to this.options. The intended use is to call this.renderList(...) when a user wants to pass in data to the component. In the future, it might make sense to only pass a reference to renderList into source, instead of depending on renderList being present on this.

from quill-mention.

cwhite-connectfirst avatar cwhite-connectfirst commented on June 4, 2024

PR #17

from quill-mention.

MadSpindel avatar MadSpindel commented on June 4, 2024

@cwhite-connectfirst Yeah, I think we should remove renderList from this.options and only pass the reference. Is it something you want to do in your pull request now or should I merge it as is?

from quill-mention.

cwhite-connectfirst avatar cwhite-connectfirst commented on June 4, 2024

@MadSpindel I can do that in my PR, since it's an easy change. It also cleans up my fix a bit.

from quill-mention.

cwhite-connectfirst avatar cwhite-connectfirst commented on June 4, 2024

Just pushed those changes

Edit: Hopefully it's obvious, but removing the ability to reference renderList on this inside of the source function is a breaking change. Just thought I'd mention it here for more visibility.

from quill-mention.

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.