diff --git a/CHANGELOG.md b/CHANGELOG.md index a34306c..090291b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline ## Dev +## 5.1.6 - 2025-07-09 + +### Fix + +* **client-api**: Fix handling of addFilters and addExclusions calls with empty arg to prevent either function from stalling client-api initialization. +* **client-api-react**: Fix updating props or using ref functions ocasionally causing repeated function calls. + +## 5.1.5 - 2025-06-18 + ### Added * **client-api**: Add `resetFilters` and `resetExclusions` calls, requires minimum Graphistry version 2.42.18 diff --git a/lerna.json b/lerna.json index 26c8218..ee5616d 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "5.1.5", + "version": "5.1.6", "packages": [ "projects/client-api", "projects/client-api-react", diff --git a/projects/client-api-react/package-lock.json b/projects/client-api-react/package-lock.json index 00e2a13..55d3d96 100644 --- a/projects/client-api-react/package-lock.json +++ b/projects/client-api-react/package-lock.json @@ -1,15 +1,15 @@ { "name": "@graphistry/client-api-react", - "version": "5.1.5", + "version": "5.1.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@graphistry/client-api-react", - "version": "5.1.5", + "version": "5.1.6", "license": "ISC", "dependencies": { - "@graphistry/client-api": "^5.1.5", + "@graphistry/client-api": "^5.1.6", "crypto-browserify": "3.12.0", "prop-types": ">=15.6.0", "shallowequal": "1.1.0", diff --git a/projects/client-api-react/package.json b/projects/client-api-react/package.json index f6e7d49..b80d6b5 100644 --- a/projects/client-api-react/package.json +++ b/projects/client-api-react/package.json @@ -1,6 +1,6 @@ { "name": "@graphistry/client-api-react", - "version": "5.1.5", + "version": "5.1.6", "repository": { "type": "git", "url": "git+https://github.com/graphistry/graphistry-js.git" @@ -69,7 +69,7 @@ "author": "Graphistry, Inc ", "license": "ISC", "dependencies": { - "@graphistry/client-api": "^5.1.5", + "@graphistry/client-api": "^5.1.6", "crypto-browserify": "3.12.0", "prop-types": ">=15.6.0", "shallowequal": "1.1.0", diff --git a/projects/client-api-react/src/index.js b/projects/client-api-react/src/index.js index ffd6768..daba18b 100644 --- a/projects/client-api-react/src/index.js +++ b/projects/client-api-react/src/index.js @@ -360,24 +360,22 @@ function handleUpdates({ g, isFirstRun, axesMap, props }) { } -// Regenerate on url change function generateIframeRef({ setLoading, setLoadingMessage, setG, setGSub, setGObs, setGErr, setFirstRun, - url, dataset, props, + url, props, axesMap, - iframeStyle, iframeClassName, iframeProps, allowFullScreen, tolerateLoadErrors }) { - console.debug('@generateIframeRef', { url, dataset, props, axesMap, iframeStyle, iframeClassName, iframeProps, allowFullScreen, tolerateLoadErrors }); + console.debug('@generateIframeRef', { url, props, axesMap, tolerateLoadErrors }); return useCallback(iframe => { - if (iframe && dataset) { - console.debug('@generateIframeRef callback', { iframe, dataset }); + if (iframe && url) { + console.debug('@generateIframeRef callback', { iframe, url }); let loaded = false; setLoading(true); setLoadingMessage('Fetching session'); - console.debug('new iframe', typeof (iframe), { iframe, dataset, propsDataset: props.dataset }); + console.debug('new iframe', typeof (iframe), { iframe, url, propsDataset: props.dataset }); const source = graphistryJS(iframe); const obs = source.pipe( tap(g => { console.debug('new graphistryJS', g); }), @@ -442,13 +440,10 @@ function generateIframeRef({ setGObs(null); } } else { - console.debug('no iframe', typeof (iframe), { iframe, dataset }); + console.debug('no iframe', typeof (iframe), { iframe, url }); return () => { }; } - }, [ - url, - iframeStyle, iframeClassName, iframeProps, allowFullScreen - ]); + }, [ url ]); } // iframe refreshes on key arg changes: via