haya-select 1.0.21 → 1.0.22
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 +5 -5
package/package.json
CHANGED
package/src/select/index.jsx
CHANGED
|
@@ -141,7 +141,7 @@ export default class HayaSelect extends React.PureComponent {
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
render() {
|
|
144
|
-
const {currentSelectedRef, endOfSelectRef} = this.t
|
|
144
|
+
const {currentSelectedRef, endOfSelectRef, onSelectClicked, onSearchTextInputChangedDebounced} = this.t
|
|
145
145
|
const {
|
|
146
146
|
attribute,
|
|
147
147
|
className,
|
|
@@ -178,13 +178,13 @@ export default class HayaSelect extends React.PureComponent {
|
|
|
178
178
|
className="haya-select-current-selected"
|
|
179
179
|
data-opened={opened}
|
|
180
180
|
data-options-placement={optionsPlacement}
|
|
181
|
-
onClick={
|
|
181
|
+
onClick={onSelectClicked}
|
|
182
182
|
ref={currentSelectedRef}
|
|
183
183
|
>
|
|
184
184
|
{opened &&
|
|
185
185
|
<input
|
|
186
186
|
className="haya-select-search-text-input"
|
|
187
|
-
onChange={
|
|
187
|
+
onChange={onSearchTextInputChangedDebounced}
|
|
188
188
|
placeholder={I18n.t("haya_select.search_dot_dot_dot")} type="text"
|
|
189
189
|
ref={this.t.searchTextInputRef}
|
|
190
190
|
/>
|
|
@@ -370,7 +370,7 @@ export default class HayaSelect extends React.PureComponent {
|
|
|
370
370
|
}
|
|
371
371
|
|
|
372
372
|
setOptionsPositionBelow() {
|
|
373
|
-
const {endOfSelectRef} = this.t
|
|
373
|
+
const {endOfSelectRef, searchTextInputRef} = this.t
|
|
374
374
|
const position = endOfSelectRef.current.getBoundingClientRect()
|
|
375
375
|
const {left, top, width} = digs(position, "left", "top", "width")
|
|
376
376
|
|
|
@@ -385,7 +385,7 @@ export default class HayaSelect extends React.PureComponent {
|
|
|
385
385
|
scrollLeft: document.documentElement.scrollLeft,
|
|
386
386
|
scrollTop: document.documentElement.scrollTop
|
|
387
387
|
},
|
|
388
|
-
() => digg(
|
|
388
|
+
() => digg(searchTextInputRef, "current").focus()
|
|
389
389
|
)
|
|
390
390
|
}
|
|
391
391
|
|