Select2 editor field plugin

Select2 editor field plugin

mguinnessmguinness Posts: 85Questions: 12Answers: 1

There seems to be an issue where the plugin makes a redundant ajax call for new records.

/api/GetNames?initialValue=true&value=%22%22

Looking at the plugin code I changed code at line 103 to the following to fix the problem:

if ( conf.opts && conf.opts.ajax && val ) {

I'm not sure this is the optimal way to correct this, but it does give me the desired result.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 62,945Questions: 1Answers: 10,356 Site admin
    Answer ✓

    Interesting one. That assumes that an empty string should be a valid value, which wouldn't always be the case. This is certainly an area that needs to be improved though!

    Allan

  • mguinnessmguinness Posts: 85Questions: 12Answers: 1

    Yeah, I discovered it when my API was expecting an integer and got "" instead.

This discussion has been closed.