question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Select props dropdownStyle set left/top failure

See original GitHub issue

Environment

antd 2.11.2

Reproduction link

[https://codepen.io/paranoidjk/pen/LWpaKe(我暂时无法提供 Link to minimal reproduction选项的Url,因此挂载上了默认提供的一个Url))

Steps to reproduce

            <Select
              mode='multiple'
              notFoundContent={NOT_FOUNT_TEXT}
              dropdownMatchSelectWidth={false}
              onFocus={this.handleFocus.bind(this)}
              onSelect={this.handleSelect.bind(this)}
              onDeselect={this.handleDeslect.bind(this)}
              onSearch={this.handleSearch.bind(this)}
              getPopupContainer={() => document.getElementById('drop-down-area')}
              ***dropdownStyle={{ left: inputLeft, display: showDropDown ? '' : 'none' }}***
              dropdownClassName='my-drop-down'
            >
              {
                renderTags.map((d, i) => (<Option key={d.value}>{d.value}</Option>))
              }
            </Select>

What is expected?

I want to use dropdownStyle to control dropdown menu’s left/top i.e. its position params

What is actually happening?

The left/top params will be coverd by components params。 传入的style参数并不生效

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:22 (11 by maintainers)

github_iconTop GitHub Comments

14reactions
Stupidismcommented, May 16, 2018

For anyone who is looking for the document, too: dependency chain: Select.dropdownAlign => rc-select.dropdownAlign => rc-trigger.popupAlign => dom-align.alignConfig

rc-select rc-trigger dom-align

13reactions
yesmeckcommented, Mar 21, 2018

Dropdown and Select are all based on rc-trigger, In Select, it’s called dropdownAlign.

https://codesandbox.io/s/ov56m6zk25

Read more comments on GitHub >

github_iconTop Results From Across the Web

unable to select item from react-native-dropdown-picker
am using React-native-dropdown-picker, however am unable to select any item from the dropdown list, the items are being overlapped by the ...
Read more >
Customize the Ant Design Select Component - Level Up Coding
I recently answered a question on Stack Overflow where a user was trying to customize the layout/style of their Ant Design Select component....
Read more >
Custom Select Component in React and Styled Components
A guide on how to create a custom dropdown in React.
Read more >
How to style the Drop-Down List in ComboBox in C ...
Step 3: After drag and drop you will go to the properties of the ComboBox control to set the DropDownStyle property of the...
Read more >
ComboBox.DropDownStyle Property (System.Windows.Forms)
Gets or sets a value specifying the style of the combo box.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found