mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
Minor bug fixes
This commit is contained in:
parent
a0a1480594
commit
73f630668a
2 changed files with 7 additions and 1 deletions
|
|
@ -96,7 +96,7 @@ export const PreviewBox = ({
|
|||
const [largeDataset, setLargeDataset] = useState(false);
|
||||
const globals = useStore((state) => state.getAllExposedValues().constants || {}, shallow);
|
||||
const secrets = useStore((state) => state.getSecrets(), shallow);
|
||||
const globalServerConstantsRegex = /.*\{\{.*globals\.server\..*\}\}.*/;
|
||||
const globalServerConstantsRegex = /^\{\{.*globals\.server.*\}\}$/;
|
||||
|
||||
const getPreviewContent = (content, type) => {
|
||||
if (content === undefined || content === null) return currentValue;
|
||||
|
|
|
|||
|
|
@ -40,10 +40,16 @@ export const createCodeHinterSlice = (set, get) => ({
|
|||
const isServerSideGlobalEnabled = !!get()?.license?.featureAccess?.serverSideGlobal;
|
||||
const serverHints = [];
|
||||
const hints = get().getSuggestions();
|
||||
console.log('isServerSideGlobalEnabled', isServerSideGlobalEnabled, 'isInsideQueryManager', isInsideQueryManager);
|
||||
if (isInsideQueryManager && isServerSideGlobalEnabled) {
|
||||
serverHints.push({ hint: 'globals.server', type: 'Object' });
|
||||
hints?.appHints?.forEach((appHint) => {
|
||||
if (appHint?.hint?.startsWith('globals.currentUser')) {
|
||||
const key = appHint?.hint?.replace('globals.currentUser', 'globals.server.currentUser');
|
||||
console.log({
|
||||
hint: key,
|
||||
type: appHint?.type,
|
||||
});
|
||||
serverHints.push({
|
||||
hint: key,
|
||||
type: appHint?.type,
|
||||
|
|
|
|||
Loading…
Reference in a new issue