Skip to content

Select list with Text and Values in "New" button #1301

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

Closed
GDileepG opened this issue May 10, 2017 · 3 comments
Closed

Select list with Text and Values in "New" button #1301

GDileepG opened this issue May 10, 2017 · 3 comments

Comments

@GDileepG
Copy link

Hi,
I am trying to add a select list to the table item, i find there is editable attribute which can be used, for example:
var editable = {
type: "select",
options:{
values: ["choice1", "choice2","choice3"]
}
};
The dropdown is successfully added in the form. But I cannot find an option to add the items with Text and Values for the dropdown as we do in HTML.

Is there any other key for "options" for the same? Please let me know.

@AllenFang
Copy link
Owner

Currently, we can't configure the text and value select option

var editable = {
    type: "select",
    options:{
        values: ["choice1", "choice2","choice3"]
    }
};

I'll try to improve it, but there's a workaround now, check https://github.com/AllenFang/react-bootstrap-table/blob/master/examples/js/custom/insert-modal/custom-insert-modal-field.js#L55

it can help you to custom the field in the insert modal. let me know if you have any questions, thanks

@AllenFang
Copy link
Owner

#243

@AllenFang
Copy link
Owner

Hello @GDileepG, it fixed on v3.3.4, check this to learn how to configure the text and value on select option. let me know if there's any concern or issues, thanks :)

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

No branches or pull requests

2 participants