Skip to content

Commit

Permalink
bug fixed for autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
mdshamoon committed Dec 18, 2020
1 parent 8c4c2e7 commit b7a09fc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/config/ConfigProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ export default class ConfigProvider extends React.Component<ConfigProviderProps>
constructor(props: ConfigProviderProps) {
super(props);

const tembaStore: any = document.createElement('temba-store');

tembaStore.completionsEndpoint = props.config.endpoints.completion;
tembaStore.functionsEndpoint = props.config.endpoints.functions;
tembaStore.fieldsEndpoint = props.config.endpoints.fields;
tembaStore.globalsEndpoint = props.config.endpoints.globals;

document.body.appendChild(tembaStore);

if (React.Children.count(props.children) > 1) {
throw new Error(SINGLE_CHILD_ERROR);
} else if (!React.isValidElement(props.children)) {
Expand Down

0 comments on commit b7a09fc

Please sign in to comment.