PromucFlow_constructor/app/client/src/widgets/MultiSelectTreeWidget/index.ts
Tolulope Adetula 15b26f823e
feat: Tree Select widget (#6271)
* feat: Tree Select

* feat: styling multiselect

* fix: selected values

* fix: remove console statement

* fix: popup position

* fix: selection types

* fix: Form validation using TreeSelect

* feat: Add Label to TreeSelect

* fix: styling

* fix: Dropdown search

* fix: Add Entity Definitions

* fix: Entity Definition

* Feat: Add clear icon

* fix: validation

* fix: options validation

* fix: Styling issues

* fix: build error

* Fix: Separate Tree Select widget

* fix: issues and add validation

* fix: Options Validation

* fix: issues with build

* fix: yarn

* fix: changes

* fix

* Fix: select component

* fix: PR issues

* fix: merge conflicts

* fix: issues

* fix: all issues

* test: added test

* fix: failing test
2021-09-17 02:08:35 -07:00

52 lines
1.2 KiB
TypeScript

import Widget from "./widget";
import IconSVG from "./icon.svg";
import { GRID_DENSITY_MIGRATION_V1 } from "widgets/constants";
export const CONFIG = {
type: Widget.getWidgetType(),
name: "Multi Select Tree",
iconSVG: IconSVG,
needsMeta: true,
defaults: {
rows: 1.72 * GRID_DENSITY_MIGRATION_V1,
columns: 4 * GRID_DENSITY_MIGRATION_V1,
mode: "SHOW_ALL",
options: [
{
label: "Blue",
value: "BLUE",
children: [
{
label: "Dark Blue",
value: "DARK BLUE",
},
{
label: "Light Blue",
value: "LIGHT BLUE",
},
],
},
{ label: "Green", value: "GREEN" },
{ label: "Red", value: "RED" },
],
widgetName: "MultiSelectTree",
defaultOptionValue: ["GREEN"],
version: 1,
isVisible: true,
isRequired: false,
isDisabled: false,
allowClear: false,
expandAll: false,
placeholderText: "select option(s)",
labelText: "Label",
},
properties: {
derived: Widget.getDerivedPropertiesMap(),
default: Widget.getDefaultPropertiesMap(),
meta: Widget.getMetaPropertiesMap(),
config: Widget.getPropertyPaneConfig(),
},
};
export default Widget;