Skip to content

Commit ec02d26

Browse files
committed
Fix table policy form warning firing incorrectly
1 parent 1c5b5e3 commit ec02d26

3 files changed

Lines changed: 22 additions & 13 deletions

File tree

CHANGES.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,22 @@
22

33
## Unreleased
44

5+
## 2026-05-27 - 0.25.2
6+
7+
- Fix issue with table policy warning firing to eagerly.
8+
59
## 2026-05-26 - 0.25.1
610

711
- Update node and pnpm versions.
812

913
## 2026-05-22 - 0.25.0
1014

11-
- Migrate from yarn to pnpms
12-
- Dependabot: Bump react-intl from 7.1.11 to 7.1.14
13-
- Dependabot: Bump flatted from 3.3.1 to 3.4.2
14-
- Dependabot: Bump ws from 8.18.0 to 8.20.1
15-
- Dependabot: Bump fast-uri from 3.0.3 to 3.1.2
16-
- Dependabot: Bump nginx from 1.29.7 to 1.29.8
15+
- Migrate from yarn to pnpm.
16+
- Dependabot: Bump react-intl from 7.1.11 to 7.1.14.
17+
- Dependabot: Bump flatted from 3.3.1 to 3.4.2.
18+
- Dependabot: Bump ws from 8.18.0 to 8.20.1.
19+
- Dependabot: Bump fast-uri from 3.0.3 to 3.1.2.
20+
- Dependabot: Bump nginx from 1.29.7 to 1.29.8.
1721

1822
## 2026-05-19 - 0.24.2
1923

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cratedb/crate-gc-admin",
3-
"version": "0.25.1",
3+
"version": "0.25.2",
44
"author": "cratedb",
55
"private": false,
66
"type": "module",

src/routes/Automation/hooks/useEligibleColumns.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,13 @@ export default function useEligibleColumns({
6464
// Update eligible columns if targets changes
6565
if (targets.length === 0) {
6666
setEligibleColumns([]);
67-
} else {
68-
setLoadingColumns(true);
69-
getEligibleColumns(gcApi, targets).then(columns => {
67+
setLoadingColumns(false);
68+
return;
69+
}
70+
71+
setLoadingColumns(true);
72+
getEligibleColumns(gcApi, targets)
73+
.then(columns => {
7074
if (columns !== null) {
7175
const eligibleColumns = Object.keys(columns.eligible_columns).map(
7276
columnName => {
@@ -81,9 +85,10 @@ export default function useEligibleColumns({
8185
} else {
8286
setEligibleColumns([]);
8387
}
88+
})
89+
.finally(() => {
90+
setLoadingColumns(false);
8491
});
85-
}
86-
setLoadingColumns(false);
8792
}, [targets]);
8893

8994
useEffect(() => {
@@ -133,7 +138,7 @@ export default function useEligibleColumns({
133138
});
134139

135140
setShowColumnsWarning(!isValid);
136-
}, [tables, targets, columnName, loadingColumns]);
141+
}, [tables, targets, columnName, loadingColumns, eligibleColumns]);
137142

138143
return {
139144
eligibleColumns,

0 commit comments

Comments
 (0)