haya-select 1.0.26 → 1.0.28
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/package.json +1 -1
- package/src/select/index.jsx +11 -1
package/package.json
CHANGED
package/src/select/index.jsx
CHANGED
|
@@ -151,6 +151,7 @@ export default class HayaSelect extends React.PureComponent {
|
|
|
151
151
|
id,
|
|
152
152
|
model,
|
|
153
153
|
multiple,
|
|
154
|
+
name,
|
|
154
155
|
onChange,
|
|
155
156
|
onOptionsClosed,
|
|
156
157
|
options,
|
|
@@ -197,6 +198,14 @@ export default class HayaSelect extends React.PureComponent {
|
|
|
197
198
|
{placeholder || I18n.t("haya_select.nothing_selected")}
|
|
198
199
|
</div>
|
|
199
200
|
}
|
|
201
|
+
{currentOptions.length == 0 &&
|
|
202
|
+
<input
|
|
203
|
+
id={idForComponent(this)}
|
|
204
|
+
name={nameForComponentWithMultiple(this)}
|
|
205
|
+
type="hidden"
|
|
206
|
+
value=""
|
|
207
|
+
/>
|
|
208
|
+
}
|
|
200
209
|
{currentOptions.map((currentOption) =>
|
|
201
210
|
<div className="current-option" key={currentOption.key || `current-value-${currentOption.value}`}>
|
|
202
211
|
{currentOption.type == "group" &&
|
|
@@ -556,7 +565,8 @@ export default class HayaSelect extends React.PureComponent {
|
|
|
556
565
|
{toggleOptions && (currentValue.value in toggled) &&
|
|
557
566
|
<i className={`fa fa-fw fa-${icon}`} />
|
|
558
567
|
}
|
|
559
|
-
{currentValue.
|
|
568
|
+
{currentValue.content}
|
|
569
|
+
{!currentValue.content && currentValue.text}
|
|
560
570
|
{("html" in currentValue) &&
|
|
561
571
|
<div dangerouslySetInnerHTML={{__html: digg(currentValue, "html")}} />
|
|
562
572
|
}
|