(widget: RNFileDialog, newProps: FileDialogProps, oldProps: FileDialogProps)
| 22 | } |
| 23 | |
| 24 | function setFileDialogProps(widget: RNFileDialog, newProps: FileDialogProps, oldProps: FileDialogProps) { |
| 25 | const setter: FileDialogProps = { |
| 26 | set defaultSuffix(defaultSuffix: string) { |
| 27 | widget.setDefaultSuffix(defaultSuffix); |
| 28 | }, |
| 29 | set supportedSchemes(supportedSchemes: string[]) { |
| 30 | widget.setSupportedSchemes(supportedSchemes); |
| 31 | }, |
| 32 | set labelText(labelText: FileDialogLabelText) { |
| 33 | widget.setLabelText(labelText.label, labelText.text); |
| 34 | }, |
| 35 | set option({option, on}: DialogOption) { |
| 36 | widget.setOption(option, on) |
| 37 | }, |
| 38 | set options(options: Option) { |
| 39 | widget.setOptions(options); |
| 40 | } |
| 41 | }; |
| 42 | Object.assign(setter, newProps); |
| 43 | setDialogProps(widget, newProps, oldProps); |
| 44 | } |
| 45 | |
| 46 | export class RNFileDialog extends QFileDialog implements RNWidget { |
| 47 | setProps(newProps: FileDialogProps, oldProps: FileDialogProps): void { |
no test coverage detected