@lblod/ember-rdfa-editor-lblod-plugins 34.0.1 → 34.0.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lblod/ember-rdfa-editor-lblod-plugins
2
2
 
3
+ ## 34.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`49c09bd`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/49c09bd0836b639afbfb8056807c3e8e765349f2) Thanks [@elpoelma](https://github.com/elpoelma)! - codelist: fix issue with `selectedCodelistOption` in case of multi-select codelist
8
+
3
9
  ## 34.0.1
4
10
 
5
11
  ### Patch Changes
@@ -112,6 +112,14 @@ export default class CodelistEditComponent extends Component<Sig> {
112
112
  // TODO: convert this back to a `trackedReset` (or an alternative) once possible.
113
113
  this.selectedCodelistOption = undefined;
114
114
  const codelistNode = this.selectedCodelist?.node;
115
+ let multiSelect: boolean;
116
+ const localSelectionStyle = this.selectedCodelist?.node.attrs
117
+ .selectionStyle as string;
118
+ if (localSelectionStyle) {
119
+ multiSelect = localSelectionStyle === 'multi';
120
+ } else {
121
+ multiSelect = result?.type === MULTI_SELECT_CODELIST_TYPE;
122
+ }
115
123
  if (
116
124
  !this.isLegacyCodelist &&
117
125
  codelistNode &&
@@ -121,7 +129,7 @@ export default class CodelistEditComponent extends Component<Sig> {
121
129
  uri: child.attrs['subject'],
122
130
  label: child.textContent,
123
131
  }));
124
- this.selectedCodelistOption = this.multiSelect ? options : options[0];
132
+ this.selectedCodelistOption = multiSelect ? options : options[0];
125
133
  } else {
126
134
  this.selectedCodelistOption = undefined;
127
135
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lblod/ember-rdfa-editor-lblod-plugins",
3
- "version": "34.0.1",
3
+ "version": "34.0.2",
4
4
  "description": "Ember addon providing lblod specific plugins for the ember-rdfa-editor",
5
5
  "keywords": [
6
6
  "ember-addon",