Skip to content

Commit 1d6035b

Browse files
committed
Remove multiselect field type and related helpers
Eliminates the 'multiselect' field type from schemas, documentation, and code. Updates references to use 'select' with the 'multiple' option instead. Removes the Field.multiselect helper and associated tests to streamline field type handling.
1 parent 2adce07 commit 1d6035b

File tree

11 files changed

+6
-78
lines changed

11 files changed

+6
-78
lines changed

content/docs/references/data/core/Field.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: Field Schema Reference
99
| :--- | :--- | :--- | :--- |
1010
| **name** | `string` | optional | Machine name (snake_case) |
1111
| **label** | `string` | optional | Human readable label |
12-
| **type** | `Enum<'text' \| 'textarea' \| 'email' \| 'url' \| 'phone' \| 'password' \| 'markdown' \| 'html' \| 'number' \| 'currency' \| 'percent' \| 'date' \| 'datetime' \| 'time' \| 'boolean' \| 'select' \| 'multiselect' \| 'lookup' \| 'master_detail' \| 'image' \| 'file' \| 'avatar' \| 'formula' \| 'summary' \| 'autonumber'>` || Field Data Type |
12+
| **type** | `Enum<'text' \| 'textarea' \| 'email' \| 'url' \| 'phone' \| 'password' \| 'markdown' \| 'html' \| 'number' \| 'currency' \| 'percent' \| 'date' \| 'datetime' \| 'time' \| 'boolean' \| 'select' \| 'lookup' \| 'master_detail' \| 'image' \| 'file' \| 'avatar' \| 'formula' \| 'summary' \| 'autonumber'>` || Field Data Type |
1313
| **description** | `string` | optional | Tooltip/Help text |
1414
| **format** | `string` | optional | Format string (e.g. email, phone) |
1515
| **required** | `boolean` | optional | Is required |

content/docs/references/data/types/FieldType.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ description: FieldType Schema Reference
2121
* `time`
2222
* `boolean`
2323
* `select`
24-
* `multiselect`
2524
* `lookup`
2625
* `master_detail`
2726
* `image`

content/docs/references/ui/interaction/ActionParam.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ description: ActionParam Schema Reference
99
| :--- | :--- | :--- | :--- |
1010
| **name** | `string` || |
1111
| **label** | `string` || |
12-
| **type** | `Enum<'text' \| 'textarea' \| 'email' \| 'url' \| 'phone' \| 'password' \| 'markdown' \| 'html' \| 'number' \| 'currency' \| 'percent' \| 'date' \| 'datetime' \| 'time' \| 'boolean' \| 'select' \| 'multiselect' \| 'lookup' \| 'master_detail' \| 'image' \| 'file' \| 'avatar' \| 'formula' \| 'summary' \| 'autonumber'>` || |
12+
| **type** | `Enum<'text' \| 'textarea' \| 'email' \| 'url' \| 'phone' \| 'password' \| 'markdown' \| 'html' \| 'number' \| 'currency' \| 'percent' \| 'date' \| 'datetime' \| 'time' \| 'boolean' \| 'select' \| 'lookup' \| 'master_detail' \| 'image' \| 'file' \| 'avatar' \| 'formula' \| 'summary' \| 'autonumber'>` || |
1313
| **required** | `boolean` | optional | |
1414
| **options** | `object[]` | optional | |

examples/crm/src/domains/crm/opportunity.object.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export const Opportunity = ObjectSchema.create({
8989
}),
9090

9191
// Competitor Analysis
92-
competitors: Field.multiselect(['Competitor A', 'Competitor B', 'Competitor C'], {
92+
competitors: Field.select(['Competitor A', 'Competitor B', 'Competitor C'], {
9393
label: 'Competitors',
9494
multiple: true,
9595
}),

packages/spec/json-schema/Action.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@
8383
"time",
8484
"boolean",
8585
"select",
86-
"multiselect",
8786
"lookup",
8887
"master_detail",
8988
"image",

packages/spec/json-schema/ActionParam.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"time",
3030
"boolean",
3131
"select",
32-
"multiselect",
3332
"lookup",
3433
"master_detail",
3534
"image",

packages/spec/json-schema/Field.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"time",
3333
"boolean",
3434
"select",
35-
"multiselect",
3635
"lookup",
3736
"master_detail",
3837
"image",

packages/spec/json-schema/FieldType.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"time",
2121
"boolean",
2222
"select",
23-
"multiselect",
2423
"lookup",
2524
"master_detail",
2625
"image",

packages/spec/json-schema/Object.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"time",
7373
"boolean",
7474
"select",
75-
"multiselect",
7675
"lookup",
7776
"master_detail",
7877
"image",

packages/spec/src/data/field.test.ts

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('FieldType', () => {
1515
'number', 'currency', 'percent',
1616
'date', 'datetime', 'time',
1717
'boolean',
18-
'select', 'multiselect',
18+
'select',
1919
'lookup', 'master_detail',
2020
'image', 'file', 'avatar',
2121
'formula', 'summary', 'autonumber'
@@ -148,20 +148,6 @@ describe('FieldSchema', () => {
148148

149149
expect(() => FieldSchema.parse(selectField)).not.toThrow();
150150
});
151-
152-
it('should accept multiselect field', () => {
153-
const multiselectField: Field = {
154-
name: 'tags',
155-
label: 'Tags',
156-
type: 'multiselect',
157-
multiple: true,
158-
options: [
159-
{ label: 'Important', value: 'important' },
160-
{ label: 'Urgent', value: 'urgent' },
161-
],
162-
};
163-
164-
expect(() => FieldSchema.parse(multiselectField)).not.toThrow();
165151
});
166152
});
167153

@@ -375,30 +361,6 @@ describe('Field Factory Helpers', () => {
375361
});
376362
});
377363

378-
describe('Multiselect Field Factory', () => {
379-
it('should create multiselect field with string array (old API)', () => {
380-
const multiselectField = Field.multiselect(['Tag1', 'Tag2', 'Tag3'], { label: 'Tags' });
381-
382-
expect(multiselectField.type).toBe('multiselect');
383-
expect(multiselectField.label).toBe('Tags');
384-
expect(multiselectField.options).toHaveLength(3);
385-
});
386-
387-
it('should create multiselect field with SelectOption array (new API)', () => {
388-
const multiselectField = Field.multiselect({
389-
label: 'Categories',
390-
options: [
391-
{ label: 'Technology', value: 'tech' },
392-
{ label: 'Business', value: 'biz' },
393-
],
394-
});
395-
396-
expect(multiselectField.type).toBe('multiselect');
397-
expect(multiselectField.options).toHaveLength(2);
398-
expect(multiselectField.options[0].value).toBe('tech');
399-
});
400-
});
401-
402364
describe('Lookup and Master-Detail Fields', () => {
403365
it('should create lookup field', () => {
404366
const lookupField = Field.lookup('account', {

0 commit comments

Comments
 (0)