Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

ideas for enhancements #208

Open
darekzak opened this issue Sep 17, 2017 · 1 comment
Open

ideas for enhancements #208

darekzak opened this issue Sep 17, 2017 · 1 comment

Comments

@darekzak
Copy link
Contributor

I have some ideas for little enhancements which I also could try to implement.

  1. trim result of Selectivity.prototype.template
    Reason:
    eg if custom dropdown template is provided and it has empty string in the begining(before root element), then it results in js error.
  2. clear method with options parameter same as setData -> options.triggerChange
    Reason:
    Now if I want to clear data without calling change event, i have to do it by hand(setData). In single and multiple inputs it looks a little bit different.
    single-> setData(null) -------> at first i just did setData() which results in an error
    multiple -> setData([])
    It would be nice to have consistent api for it -> clear({triggerChange: boolean}).
    I guess that in the future it is possible that setData would pass eg undefined for clearing purpose, so I think it's not such bad idea to hide this implementation detail.

What do you think about it?

@arendjr
Copy link
Owner

arendjr commented Sep 19, 2017

Both are good suggestions, thanks! If you would like to submit PRs, I'd be happy to accept them! (After review of course :)

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

No branches or pull requests

2 participants