export interface FileInputProps {
input: FileCommandInputParameter;
+ options?: { showOnlyOwned: boolean, showOnlyWritable: boolean };
}
-export const FileInput = ({ input }: FileInputProps) =>
+export const FileInput = ({ input, options }: FileInputProps) =>
<Field
name={input.id}
commandInput={input}
component={FileInputComponent}
format={format}
parse={parse}
+ {...{
+ options
+ }}
validate={getValidation(input)} />;
const format = (value?: File) => value ? value.basename : '';
}
const FileInputComponent = connect()(
- class FileInputComponent extends React.Component<GenericInputProps & DispatchProp, FileInputComponentState> {
+ class FileInputComponent extends React.Component<GenericInputProps & DispatchProp & {
+ options?: { showOnlyOwned: boolean, showOnlyWritable: boolean };
+ }, FileInputComponentState> {
state: FileInputComponentState = {
open: false,
};
pickerId={this.props.commandInput.id}
includeCollections
includeFiles
+ options={this.props.options}
toggleItemActive={this.setFile} />
</DialogContent>
<DialogActions>