@datalayer/design 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/pages/IconsPage.js +5 -0
- package/package.json +1 -1
package/lib/pages/IconsPage.js
CHANGED
|
@@ -65,6 +65,11 @@ export function IconsPage() {
|
|
|
65
65
|
const view = searchParams.get("view") === "viewer" ? "viewer" : "grid";
|
|
66
66
|
const choose = (index) => {
|
|
67
67
|
const next = VIEWS[index];
|
|
68
|
+
// Primer calls onChange for the selected segment too: choosing the view
|
|
69
|
+
// already shown keeps the address, and the viewer's search (`q`) with it.
|
|
70
|
+
if (next === view) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
68
73
|
setSearchParams((current) => {
|
|
69
74
|
const params = new URLSearchParams(current);
|
|
70
75
|
if (next === "viewer")
|