Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 83469

FileValue import does not exist when working with pluggable widgets

$
0
0
Hi, I found the following in the docs: DynamicValue<FileValue> is used to represent files. A file can be configured only through a file property. FileValue is defined as follows: export interface FileValue { uri: string; } In my widget I try to access the uri of the FileValue, but FileValue cannot even be imported. import { FileValue } from "mendix"; […]node_modules/mendix/index"' has no exported member 'FileValue'.   import { Component, ReactNode, createElement } from "react"; import { FileValue } from "mendix"; export interface InputProps { file: FileValue; } export class Player extends Component<InputProps> { render(): ReactNode { return <audio controls> <source src={this.props.file.uri} type="audio/mpeg" /> </audio>; } }   I can however import “DynamicValue” without any problems. Bonus: Found this GitMemory entry where FileValue is also imported from “mendix”. Is FileValue deprecated?  

Viewing all articles
Browse latest Browse all 83469

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>