Skip to content
Snippets Groups Projects
Commit ad02db83 authored by Leonardo Christino's avatar Leonardo Christino
Browse files

Merge branch 'DEV-29' into 'main'

fix(qb): fix node attribute dropdown

See merge request !40
parents 3bc15df1 92c69ef6
No related branches found
No related tags found
1 merge request!40fix(qb): fix node attribute dropdown
Pipeline #126932 passed
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -2,7 +2,7 @@ import React from 'react';
import { querybuilderSlice, setQuerybuilderNodes, setSchema, store } from '@graphpolaris/shared/lib/data-access/store';
import { configureStore } from '@reduxjs/toolkit';
import { Meta } from '@storybook/react';
import { Meta, StoryObj } from '@storybook/react';
import { Provider } from 'react-redux';
import QueryBuilderInner from '../querybuilder';
import { Handles, NodeAttribute, QueryElementTypes, QueryMultiGraphology, toHandleId } from '../../model';
......@@ -15,34 +15,39 @@ const Component: Meta<typeof QueryBuilderInner> = {
decorators: [(story) => <div>{story()}</div>],
};
export const SimpleDisconnected = {
args: {},
export const SimpleDisconnected: StoryObj = {
args: {
nodes: [
{
name: 'entity',
attributes: [
{ name: 'city', type: 'string' },
{ name: 'vip', type: 'bool' },
{ name: 'state', type: 'string' },
],
},
],
edges: [
{
name: 'entity:entity',
from: 'entity',
to: 'entity',
collection: 'entity2entity',
attributes: [
{ name: 'arrivalTime', type: 'int' },
{ name: 'departureTime', type: 'int' },
],
},
],
},
decorators: [
(story: any) => {
(story: any, { args }: any) => {
console.log(args);
const graph = new QueryMultiGraphology();
const schema = SchemaUtils.schemaBackend2Graphology({
nodes: [
{
name: 'entity',
attributes: [
{ name: 'city', type: 'string' },
{ name: 'vip', type: 'bool' },
{ name: 'state', type: 'string' },
],
},
],
edges: [
{
name: 'entity:entity',
from: 'entity',
to: 'entity',
collection: 'entity2entity',
attributes: [
{ name: 'arrivalTime', type: 'int' },
{ name: 'departureTime', type: 'int' },
],
},
],
nodes: args.nodes,
edges: args.edges,
});
store.dispatch(setSchema(schema.export()));
......
......@@ -46,7 +46,7 @@
transform: translateY(0%);
}
100% {
max-height: 100px;
max-height: 100000px;
opacity: 1;
transform: translateY(0);
}
......@@ -69,7 +69,7 @@
.content_display {
// visibility: visible;
display: block;
max-height: 100px;
max-height: unset;
}
.io {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment