Skip to content

Commit 36e8356

Browse files
authored
Merge pull request #115 from badgateway/issue-113
Align HalFormsOptions with the latest specification version
2 parents 10feb30 + 7615e32 commit 36e8356

1 file changed

Lines changed: 2 additions & 38 deletions

File tree

src/hal-forms.ts

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -227,48 +227,12 @@ export interface HalFormsTextAreaProperty extends HalFormsBaseProperty {
227227
/**
228228
* HalFormsOptions is the 'options' property on fields.
229229
*/
230-
type HalFormsOptions = HalFormsOptionsDataSource & HalFormsOptionsMultiple;
231-
232-
/**
233-
* Helper type for the 'multiple' property and side-effects of it being set./
234-
*/
235-
type HalFormsOptionsMultiple = {
236-
/**
237-
* Allow the user to select exactly 1 value, or more than 1.
238-
*/
239-
multiple?: false;
240-
241-
/**
242-
* Current value of the field. This overrides value from the 'parent'.
243-
*/
244-
selectedValues?: string|number|boolean;
245-
246-
/**
247-
* If the data source is an array of objects, use this property for the
248-
* label.
249-
*
250-
* If this is not set, 'prompt' is assumed.
251-
*/
252-
promptField?: string;
253-
254-
/**
255-
* If the data source is an array of objects, use this property for the
256-
* value
257-
*
258-
* If this is not set, 'value' is assumed.
259-
*/
260-
valueField?: string;
261-
262-
} | {
263-
/**
264-
* Allow the user to select exactly 1 value, or more than 1.
265-
*/
266-
multiple: true;
230+
type HalFormsOptions = HalFormsOptionsDataSource & {
267231

268232
/**
269233
* Current value of the field. This overrides value from the 'parent'.
270234
*/
271-
selectedValues?: (string|number|boolean)[];
235+
selectedValues?: string[];
272236

273237
/**
274238
* If provided, this will require a minimum number of items to be selected.

0 commit comments

Comments
 (0)