@ni/nimble-components 7.4.0 → 7.4.1
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/dist/all-components-bundle.js +8 -18
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +2 -1
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/nimble-components/src/select/index.d.ts +1 -2
- package/dist/esm/select/index.d.ts +1 -2
- package/dist/esm/select/index.js +8 -18
- package/dist/esm/select/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -17211,24 +17211,6 @@
|
|
|
17211
17211
|
* A nimble-styed HTML select
|
|
17212
17212
|
*/
|
|
17213
17213
|
class Select extends Select$1 {
|
|
17214
|
-
get value() {
|
|
17215
|
-
return super.value;
|
|
17216
|
-
}
|
|
17217
|
-
set value(value) {
|
|
17218
|
-
super.value = value;
|
|
17219
|
-
// Workaround for https://github.com/microsoft/fast/issues/5139
|
|
17220
|
-
// When the value property is set very early in the element's lifecycle (e.g. Angular value binding),
|
|
17221
|
-
// the options property will not be set yet. As a workaround, we mark the listbox-option element with
|
|
17222
|
-
// the selected attribute, which will set the initial value correctly.
|
|
17223
|
-
if (value !== null && this.options.length === 0) {
|
|
17224
|
-
const options = this.querySelectorAll('option,[role="option"]');
|
|
17225
|
-
options.forEach(option => {
|
|
17226
|
-
if (option.getAttribute('value') === value) {
|
|
17227
|
-
option.setAttribute('selected', '');
|
|
17228
|
-
}
|
|
17229
|
-
});
|
|
17230
|
-
}
|
|
17231
|
-
}
|
|
17232
17214
|
// Workaround for https://github.com/microsoft/fast/issues/5123
|
|
17233
17215
|
setPositioning() {
|
|
17234
17216
|
if (!this.$fastController.isConnected) {
|
|
@@ -17243,6 +17225,14 @@
|
|
|
17243
17225
|
// Call setPositioning() after this.forcedPosition is initialized.
|
|
17244
17226
|
this.setPositioning();
|
|
17245
17227
|
}
|
|
17228
|
+
// Workaround for https://github.com/microsoft/fast/issues/5773
|
|
17229
|
+
slottedOptionsChanged(prev, next) {
|
|
17230
|
+
const value = this.value;
|
|
17231
|
+
super.slottedOptionsChanged(prev, next);
|
|
17232
|
+
if (value) {
|
|
17233
|
+
this.value = value;
|
|
17234
|
+
}
|
|
17235
|
+
}
|
|
17246
17236
|
}
|
|
17247
17237
|
const nimbleSelect = Select.compose({
|
|
17248
17238
|
baseName: 'select',
|