react-awesome-query-builder
react-awesome-query-builder copied to clipboard
AllowCustomValues for select (in addition to multiselect)?
Title pretty much says it all. It would be awesome to be able to select a custom value for a single select widget.
You can try to use custom Select widget like this: https://codesandbox.io/s/geose But it looks dirty, AntDesign doesn't support true custom values for single Select out-of-box, so I don't want to include this in lib. But PR is welcomed
For MaterialUI you can use this field config to solve your issue:
label: "your select name",
type: "select",
valueSources: ["value"],
fieldSettings: {
listValues: ['a', 'b'], // your list of values
allowCustomValues: true
},
mainWidgetProps: {
showSearch: true // required for now, will set to true by default in next versions
}
},
For AntDesign it's in my todo list
Hi @ukrbublik, Even I'm facing the same issue(allowCustomValues) with material UI. It's working with AntdConfig but not with Material UI.
Here is the CBS https://codesandbox.io/s/modest-shaw-jwfrg4?file=/src/demo/config_simple.tsx.
Closed as resolved in 6.3.0