Skip to content

Commit 4378c6f

Browse files
authored
feat: add multiple property for input[type=file] (#4513)
1 parent 8a90a5b commit 4378c6f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

packages/components/src/components/input/input.lite.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ export default function DBInput(props: DBInputProps) {
215215
id={state._id}
216216
name={props.name}
217217
type={props.type || 'text'}
218+
multiple={getBoolean(props.multiple, 'multiple')}
218219
placeholder={props.placeholder ?? DEFAULT_PLACEHOLDER}
219220
disabled={getBoolean(props.disabled, 'disabled')}
220221
required={getBoolean(props.required, 'required')}

packages/components/src/components/input/model.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ export type DBInputDefaultProps = {
5151
* Add a custom id to [data list](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist) if you're using `dataList` attribute.
5252
*/
5353
dataListId?: string;
54+
/**
55+
* Allow selecting multiple files. https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/file#multiple
56+
*/
57+
multiple?: boolean | string;
5458
/**
5559
* Maximum value
5660
*/

0 commit comments

Comments
 (0)