Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,15 @@ import api from './host-api-stub';
import context from './host-context-stub';
import loadApp from './src/loaders/performed-work-details-grid-card-loader';

loadApp(document.getElementById('app'), context, api);
let args = {
/** Контейнер. */
container: document.getElementById('app'),
/** Контекст инициализации. */
initialContext: context,
/** API сторонних компонентов. */
api: api,
/** Параметры стороннего контрола.*/
controlInfo: null
}

loadApp(args);
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const PerformedWorkDetailsGrid: React.FC<IProps> = ({ initialContext, api }) =>
const [ context, setContext ] = React.useState(initialContext);

// Задаем локализацию внутри контрола в соответствии с локализацией в контексте, в котором находится контрол.
const currentCulture = context.currentCulture ?? DEFAULT_CULTURE;
const currentCulture = context?.currentCulture ?? DEFAULT_CULTURE;
const { i18n } = useTranslation();
React.useEffect(() => {
i18n.changeLanguage(currentCulture);
Expand Down