react-awesome-query-builder icon indicating copy to clipboard operation
react-awesome-query-builder copied to clipboard

AllowCustomValues for select (in addition to multiselect)?

Open ConnerV42 opened this issue 4 years ago • 2 comments

Title pretty much says it all. It would be awesome to be able to select a custom value for a single select widget.

ConnerV42 avatar Apr 06 '20 23:04 ConnerV42

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

ukrbublik avatar May 22 '20 19:05 ukrbublik

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

ukrbublik avatar Oct 18 '21 23:10 ukrbublik

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.

nageshwari17 avatar Sep 28 '22 07:09 nageshwari17

Closed as resolved in 6.3.0

ukrbublik avatar Jul 11 '23 16:07 ukrbublik