Skip to content

Unable to override templates #11

@nhunzaker

Description

@nhunzaker

It looks like this package uses deep-assign under the hood, which does not merge in function values:

var deepAssign = require("deep-assign")

deepAssign({ templates: { suggestion: true } }, { templates: { suggestion: () => {} } })

via https://npm.runkit.com/deep-assign

This makes it impossible to change the suggestion template which is used to control the display text of suggestions during autocomplete:

let options = {
  templates: {
    suggestion: entry => entry.name
  }
}

<AgAutocomplete options={options} />

Additionally, deep-assign has been deprecated, and the author recommends using something like merge-options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions