Skip to content

Commit a04e240

Browse files
Bricks syllable count can’t select all attributes (disabled dropdown)
1 parent 1299860 commit a04e240

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/shared/bricks-integrator/VariableSelect.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { selectBricksIntegratorAttributes, selectBricksIntegratorEmbeddings, selectBricksIntegratorLabelingTasks, selectBricksIntegratorLabels, selectBricksIntegratorLanguages, selectBricksIntegratorLookupLists, setAttributesBricksIntegrator, setEmbeddingsBricksIntegrator, setLabelingTasksBricksIntegrator, setLabelsBricksIntegrator, setLanguagesBricksIntegrator, setLookupListsBricksIntegrator } from "@/src/reduxStore/states/general";
2-
import { selectLabelingTasksAll } from "@/src/reduxStore/states/pages/settings";
2+
import { selectLabelingTasksAll, setLabelingTasksAll } from "@/src/reduxStore/states/pages/settings";
33
import { selectProjectId } from "@/src/reduxStore/states/project";
44
import { WebSocketsService } from "@/src/services/base/web-sockets/WebSocketsService";
55
import { unsubscribeWSOnDestroy } from "@/src/services/base/web-sockets/web-sockets-helper";
@@ -41,7 +41,7 @@ export default function VariableSelect(props: VariableSelectProps) {
4141

4242
useEffect(() => {
4343
if (!projectId) return;
44-
44+
refetchLabelingTasksAndProcess(null);
4545
WebSocketsService.subscribeToNotification(CurrentPage.BRICKS_INTEGRATOR, {
4646
projectId: projectId,
4747
whitelist: ['attributes_updated', 'calculate_attribute', 'label_created', 'label_deleted', 'labeling_task_deleted', 'labeling_task_updated', 'labeling_task_created', 'embedding', 'embedding_deleted', 'knowledge_base_deleted', 'knowledge_base_created'],
@@ -146,6 +146,7 @@ export default function VariableSelect(props: VariableSelectProps) {
146146
function refetchLabelingTasksAndProcess(typeFilter: string) {
147147
refetchLabelingTasksByProjectId({ variables: { projectId: projectId } }).then((res) => {
148148
const labelingTasks = postProcessLabelingTasks(res['data']['projectByProjectId']['labelingTasks']['edges']);
149+
dispatch(setLabelingTasksAll(labelingTasks));
149150
if (!labelingTasks) {
150151
console.log("labeling Tasks not yet loaded");
151152
return null;

0 commit comments

Comments
 (0)