如何覆盖 Elastic UI 组合框的默认高度

How to override the default height of Elastic UI combobox

我想自定义 Task 组合框的高度以匹配 Date Picker。 通过 class 或内联完成时不会应用样式。

我尝试将元素内联样式设置为:

 <EuiFormRow className={FilterStyles.taskFilerContainer}>
        <EuiComboBox
          fullWidth={true}
          placeholder="Task"
          options={tasks}
          selectedOptions={selectedOption}
          onChange={(v) => handleChange(v)}
          isClearable={true}
          compressed={false}
          rowHeight={60}
          style={{ height: "40px" }}   <----- Here
          className="task"
        />
      </EuiFormRow>

也尝试添加 !important 但没有用。
但是,我可以通过手动设置 euiComboBox class:

的样式来覆盖浏览器中的样式

.euiComboBox .euiComboBox__inputWrap.euiComboBox__inputWrap-isClearable {
    padding-right: 58.125px;
    height: 40px; <-- Here
}

有没有办法通过编写自定义 class 或内联样式来设置元素样式?

通过降低父容器的高度解决filterContainer。降低了包裹这两个输入字段的元素的高度。

.filterContainer{
 height: 37px
}