Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix liveattrs values refresh #6224

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions public/files/js/models/textTypes/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1027,15 +1027,17 @@ export class TextTypesModel extends StatefulModel<TextTypesModelState>
this.mapItems(
state,
k,
(attrVal, i) => {
if (block[i]) {
(attrVal, _) => {
// we can't use index _, order might not be the same
const b = List.find(v => v.ident === attrVal.ident, block);
if (b) {
return {
ident: block[i].ident,
value: block[i].v,
ident: b.ident,
value: b.v,
selected: attrVal.selected,
locked: attrVal.locked,
numGrouped: block[i].numGrouped,
availItems: block[i].availItems,
numGrouped: b.numGrouped,
availItems: b.availItems,
extendedInfo: attrVal.extendedInfo
};

Expand Down
4 changes: 2 additions & 2 deletions public/files/js/pages/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export class QueryPage {
subcorpTTStructure:ExportedSelection
):[QueryFormProps, Array<AnyTTSelection>] {
const attributes = importInitialTTData(
textTypesData, subcorpTTStructure, subcorpTTStructure);
textTypesData, queryFormArgs.selected_text_types, subcorpTTStructure);
this.textTypesModel = new TextTypesModel({
dispatcher: this.layoutModel.dispatcher,
pluginApi: this.layoutModel.pluginApi(),
Expand All @@ -144,7 +144,7 @@ export class QueryPage {
refineEnabled: hasSelectedItems,
manualAlignCorporaMode: false,
subcorpTTStructure,
textTypesData: this.layoutModel.getConf<TTInitialData>('textTypesData')
textTypesData,
}
);

Expand Down