Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setOptions not working in select editor when function is used. #551

Open
stephenjgray opened this issue Apr 5, 2019 · 0 comments
Open

Comments

@stephenjgray
Copy link

stephenjgray commented Apr 5, 2019

I am using the following schema for a radio control:

    radio: {
        type: 'Radio',
        title: 'Title'
        options: function() {
            return [
                { label: 'radio 1', val: 'value1' },
                { label: 'radio2, val: 'value2'}
            ]
        }
    }

The code seems to get as far as the else if (_.isFunction(options)) block but does not make it into the renderOptions function. I have over-ridden the function in my code and replaced the block with:

    else if (_.isFunction(options)) {
        var newOptions = options();
    
        this.renderOptions(newOptions);
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant