Skip to content

Commit fcb380a

Browse files
committed
fix reload
1 parent 14051f8 commit fcb380a

File tree

9 files changed

+22
-535
lines changed

9 files changed

+22
-535
lines changed

package-lock.json

Lines changed: 3 additions & 514 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/tdb-dashboard/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
"dependencies": {
4343
"@apollo/client": "^3.7.1",
4444
"@auth0/auth0-spa-js": "^1.19.3",
45-
"@emotion/styled": "^11.10.5",
4645
"@graphiql/toolkit": "^0.8.0",
4746
"@material-ui/core": "^4.12.4",
4847
"@material-ui/icons": "^4.11.3",

packages/tdb-dashboard/src/components/DataProductDocuments.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const DataProductDocuments = () => {
3434
// I call ones
3535
useEffect(() => {
3636
getDocNumber()
37-
if(!currentChangeRequest || frames===null)getUpdatedFrames()
37+
getUpdatedFrames()
3838
},[dataProduct])
3939

4040
function handlePropertyClick (property) {

packages/tdb-dashboard/src/components/DocumentsGraphqlTable.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export const DocumentsGraphqlTable = ({type,onRowClick,showGraphqlTab=true}) =>
2323
const [queryToDisplay,setQueryTodisplay] = useState(false)
2424

2525
if (!query) return ""
26+
const tablesColumnsConfig = tableConfig.tablesColumnsConfig[type] || []
2627
const { documentError,
2728
callFetchMore,
2829
rowCount,
@@ -56,7 +57,7 @@ export const DocumentsGraphqlTable = ({type,onRowClick,showGraphqlTab=true}) =>
5657
}
5758

5859
const tableConfigObj = {}
59-
tableConfigObj.columns = tableConfig.tablesColumnsConfig[type] || []
60+
tableConfigObj.columns = tablesColumnsConfig
6061
tableConfigObj.rowClick = onRowClickCall
6162

6263
let extractedResults = documentResults ? extractDocuments(documentResults[type]) : []

packages/tdb-dashboard/src/hooks/DocumentControlContext.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,9 @@ export const DocumentControlProvider = ({children}) => {
126126
useEffect(() => {
127127
// only if I'm in change request mode
128128
// I do not need to reload because the schema can not change
129-
if(!currentChangeRequest || documentTablesConfig === null) getGraphqlTableConfig()
130-
if(!currentChangeRequest || frames===null)getUpdatedFrames()
129+
//if(!currentChangeRequest || documentTablesConfig === null)
130+
getGraphqlTableConfig()
131+
getUpdatedFrames()
131132
// we need in edit/insert
132133
if(id) {
133134
let documentID=decodeUrl(id)

packages/tdb-dashboard/src/pages/DocumentNew.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ const DisplayDocumentBody = () => {
2828

2929

3030
useEffect(() => {
31-
if(!currentChangeRequest || frames===null) {
32-
getUpdatedFrames()
33-
}
34-
if(!currentChangeRequest || documentTablesConfig === null) getGraphqlTableConfig()
31+
//if(!currentChangeRequest || frames===null) {
32+
getUpdatedFrames()
33+
//}
34+
//if(!currentChangeRequest || documentTablesConfig === null)
35+
getGraphqlTableConfig()
3536
},[])
3637

3738
const callCreateDocument = async (jsonDocument) =>{

packages/tdb-dashboard/src/pages/DocumentsListPage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const DocumentsPageList = () => {
1515
const viewGraphql = documentTablesConfig && documentTablesConfig.objQuery[type] && documentTablesConfig.objQuery[type].query
1616

1717
useEffect(() => {
18-
if(!currentChangeRequest || documentTablesConfig === null) getGraphqlTableConfig()
18+
getGraphqlTableConfig()
1919
},[])
2020

2121
if(loading || documentTablesConfig===null) return <Loading message={`Loading Documents list ...`}/>

packages/tdb-react-table/package.json

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@terminusdb/terminusdb-react-table",
3-
"version": "6.1.4",
3+
"version": "6.1.5",
44
"description": "Table for terminusdb",
55
"main": "src/index",
66
"module": "es6/index",
@@ -40,15 +40,11 @@
4040
"repository": {},
4141
"author": "terminusdb group",
4242
"dependencies": {
43-
"@apollo/client": "^3.7.0",
4443
"@terminusdb/terminusdb-client": "^10.0.25",
45-
"apollo-client": "^2.6.10",
4644
"babel-jest": "^29.3.1",
4745
"classnames": "^2.2.5",
4846
"date-fns": "^2.28.0",
49-
"graphql": "^16.6.0",
5047
"material-ui-confirm": "^3.0.8",
51-
"react-apollo": "^3.1.5",
5248
"react-awesome-query-builder": "^5.4.0",
5349
"react-bootstrap": "^2.7.0",
5450
"react-csv": "^2.2.2",
@@ -74,11 +70,6 @@
7470
"cross-env": "^7.0.3",
7571
"css-loader": "^6.7.3",
7672
"dotenv-webpack": "^7.1.0",
77-
"eslint": "^8.8.0",
78-
"eslint-config-airbnb": "^19.0.4",
79-
"eslint-plugin-import": "^2.14.0",
80-
"eslint-plugin-jsx-a11y": "^6.1.0",
81-
"eslint-plugin-react": "^7.16.0",
8273
"file-loader": "^6.2.0",
8374
"less-loader": "^11.1.0",
8475
"mini-css-extract-plugin": "^2.7.2",

packages/tdb-react-table/src/hook/ControlledGraphqlQuery.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ export function ControlledGraphqlQuery (apolloClient, graphqlQuery, documentType
1111
// const [hasNextPage, setHasNextPage] = useState(true)
1212
const [controlledRefresh, setControlledRefresh] = useState(0)
1313
const [data, setData] = useState(null)
14+
15+
let startHidden = ['_id']
16+
if(tableConfigObj.length === 1){
17+
startHidden =[]
18+
}
1419

15-
const [hiddenColumnsArr,setHiddenColumnsArr] = useState(['_id'])
20+
const [hiddenColumnsArr,setHiddenColumnsArr] = useState(hiddenColumnsStart || startHidden)
1621

1722
//filter is the filter formatted for the query
1823
let filterTable = []

0 commit comments

Comments
 (0)