@primer/view-components 0.39.0-rc.2a62a5ab → 0.39.0-rc.5e2ced3e
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.
@@ -893,7 +893,8 @@ _SelectPanelElement_setDynamicLabel = function _SelectPanelElement_setDynamicLab
|
|
893
893
|
};
|
894
894
|
_SelectPanelElement_updateInput = function _SelectPanelElement_updateInput() {
|
895
895
|
if (this.selectVariant === 'single') {
|
896
|
-
const input = this.querySelector(`[data-select-panel-inputs=true] input`)
|
896
|
+
const input = this.querySelector(`[data-select-panel-inputs=true] input`) ??
|
897
|
+
this.querySelector(`[data-list-inputs=true] input`);
|
897
898
|
if (!input)
|
898
899
|
return;
|
899
900
|
const selectedItem = this.selectedItems[0];
|
@@ -909,7 +910,8 @@ _SelectPanelElement_updateInput = function _SelectPanelElement_updateInput() {
|
|
909
910
|
}
|
910
911
|
else if (this.selectVariant !== 'none') {
|
911
912
|
// multiple select variant
|
912
|
-
const
|
913
|
+
const isRemoteInput = !!this.querySelector('[data-select-panel-inputs=true]');
|
914
|
+
const inputList = this.querySelector('[data-select-panel-inputs=true]') ?? this.querySelector('[data-list-inputs=true]');
|
913
915
|
if (!inputList)
|
914
916
|
return;
|
915
917
|
const inputs = inputList.querySelectorAll('input');
|
@@ -918,7 +920,7 @@ _SelectPanelElement_updateInput = function _SelectPanelElement_updateInput() {
|
|
918
920
|
}
|
919
921
|
for (const selectedItem of this.selectedItems) {
|
920
922
|
const newInput = document.createElement('input');
|
921
|
-
newInput.setAttribute('data-select-panel-input'
|
923
|
+
newInput.setAttribute(`${isRemoteInput ? 'data-select-panel-input' : 'data-list-input'}`, 'true');
|
922
924
|
newInput.type = 'hidden';
|
923
925
|
newInput.autocomplete = 'off';
|
924
926
|
newInput.name = selectedItem.inputName || __classPrivateFieldGet(this, _SelectPanelElement_inputName, "f");
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@primer/view-components",
|
3
|
-
"version": "0.39.0-rc.
|
3
|
+
"version": "0.39.0-rc.5e2ced3e",
|
4
4
|
"description": "ViewComponents for the Primer Design System",
|
5
5
|
"main": "app/assets/javascripts/primer_view_components.js",
|
6
6
|
"module": "app/components/primer/primer.js",
|