JmixAppProvider
JmixAppProvider
initializes main Jmix React Core components and provides them to the client application. It receives an instance of REST API service and an optional config object which has the following interface:
import {PropertyType} from "@haulmont/jmix-rest";
export interface JmixRestConnectionConfig {
dataTransferFormats?: Partial<Record<PropertyType, string>>;
displayFormats?: Partial<Record<PropertyType, string>>;
}
-
dataTransferFormats
can be used to override the default formats used to (de)serialize the data transferred by REST API. -
displayFormats
can be used to override the formats used for data presentation.
See PropertyType in Jmix REST API docs for the list of available property types.
Only formats for temporal types can currently be overridden this way. |
<JmixAppProvider jmixREST={jmixREST}
config={{
dataTransferFormats: {
localDateTime: 'DD/MM/YYYY HH:mm:ss'
}
}}
>
// App component tree
</JmixAppProvider>
API: JmixAppProviderProps.