Skip to content

Commit

Permalink
Use EuiCompressedComboBox
Browse files Browse the repository at this point in the history
Signed-off-by: Miki <[email protected]>
  • Loading branch information
AMoo-Miki committed Aug 1, 2024
1 parent 4115d74 commit 69a0f0d
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions public/apps/account/tenant-switch-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
EuiSmallButton,
EuiSmallButtonEmpty,
EuiCallOut,
EuiComboBox,
EuiCompressedComboBox,
EuiComboBoxOptionOption,
EuiModal,
EuiModalBody,
Expand Down Expand Up @@ -258,7 +258,7 @@ export function TenantSwitchPanel(props: TenantSwitchPanelProps) {
{/* This combo box has to be outside the radio group.
In current EUI if put into the child of radio option, clicking in the combo box will not
show the drop down list since the radio option consumes the click event. */}
<EuiComboBox
<EuiCompressedComboBox
placeholder="Select a custom tenant"
options={customTenantOptions}
singleSelection={{ asPlainText: true }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import React, { Fragment } from 'react';
import {
EuiCodeBlock,
EuiComboBox,
EuiCompressedComboBox,
EuiDescribedFormGroup,
EuiCompressedFormRow,
EuiSpacer,
Expand Down Expand Up @@ -77,7 +77,7 @@ export function EditSettingGroup(props: {
val = val || [];

return (
<EuiComboBox
<EuiCompressedComboBox
placeholder={setting.title}
options={setting.options.map(stringToComboBoxOption)}
// @ts-ignore
Expand All @@ -91,7 +91,7 @@ export function EditSettingGroup(props: {
val = val || [];

return (
<EuiComboBox
<EuiCompressedComboBox
noSuggestions
placeholder={setting.title}
// @ts-ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
EuiModalHeaderTitle,
EuiOverlayMask,
EuiForm,
EuiComboBox,
EuiCompressedComboBox,
} from '@elastic/eui';
import React, { useState } from 'react';
import { ComboBoxOptions, Action } from '../../types';
Expand Down Expand Up @@ -76,7 +76,7 @@ export function PermissionEditModal(props: PermissionEditModalDeps) {
setIsFormValid={setIsFormValid}
/>
<FormRow headerText="Permissions">
<EuiComboBox
<EuiCompressedComboBox
options={props.optionUniverse}
selectedOptions={allowedActions}
onCreateOption={appendOptionToComboBoxHandler(setAllowedActions, [])}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/

import React, { Dispatch, SetStateAction } from 'react';
import { EuiForm, EuiFlexGroup, EuiFlexItem, EuiComboBox } from '@elastic/eui';
import { EuiForm, EuiFlexGroup, EuiFlexItem, EuiCompressedComboBox } from '@elastic/eui';
import { ComboBoxOptions } from '../../types';
import { ResourceType } from '../../../../../common';
import { PanelWithHeader } from '../../utils/panel-with-header';
Expand Down Expand Up @@ -45,7 +45,7 @@ export function ClusterPermissionPanel(props: {
>
<EuiFlexGroup>
<EuiFlexItem className={LIMIT_WIDTH_INPUT_CLASS}>
<EuiComboBox
<EuiCompressedComboBox
placeholder="Search for action group name or permission name"
options={optionUniverse}
selectedOptions={state}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import {
EuiAccordion,
EuiSmallButton,
EuiComboBox,
EuiCompressedComboBox,
EuiFlexGroup,
EuiFlexItem,
EuiHorizontalRule,
Expand Down Expand Up @@ -121,7 +121,7 @@ export function IndexPatternRow(props: {
return (
<FormRow headerText="Index" helpText="Specify index pattern using *">
<EuiFlexItem className={LIMIT_WIDTH_INPUT_CLASS}>
<EuiComboBox
<EuiCompressedComboBox
noSuggestions
placeholder="Search for index name or type in index pattern"
selectedOptions={props.value}
Expand Down Expand Up @@ -149,7 +149,7 @@ export function IndexPermissionRow(props: {
>
<EuiFlexGroup>
<EuiFlexItem className={LIMIT_WIDTH_INPUT_CLASS}>
<EuiComboBox
<EuiCompressedComboBox
placeholder="Search for action group name or permission name"
options={props.permisionOptionsSet}
selectedOptions={props.value}
Expand Down Expand Up @@ -214,7 +214,7 @@ export function FieldLevelSecurityRow(props: {
/>
</EuiFlexItem>
<EuiFlexItem grow={9}>
<EuiComboBox
<EuiCompressedComboBox
noSuggestions
placeholder="Type in field name"
selectedOptions={props.fields}
Expand All @@ -238,7 +238,7 @@ export function AnonymizationRow(props: {
headerSubText="Masks any sensitive fields with a random value to protect your data security."
optional
>
<EuiComboBox
<EuiCompressedComboBox
noSuggestions
placeholder="Type in field name"
selectedOptions={props.value}
Expand Down
4 changes: 2 additions & 2 deletions public/apps/configuration/panels/role-edit/tenant-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import {
EuiSmallButton,
EuiComboBox,
EuiCompressedComboBox,
EuiFlexGroup,
EuiFlexItem,
EuiCompressedSuperSelect,
Expand Down Expand Up @@ -91,7 +91,7 @@ function generateTenantPermissionPanels(
<Fragment key={`tenant-permission-${arrayIndex}`}>
<EuiFlexGroup>
<EuiFlexItem style={{ maxWidth: '400px' }}>
<EuiComboBox
<EuiCompressedComboBox
placeholder="Search tenant name or add a tenant pattern"
selectedOptions={tenantPermission.tenantPatterns}
onChange={onValueChangeHandler('tenantPatterns')}
Expand Down
4 changes: 2 additions & 2 deletions public/apps/configuration/panels/role-mapping/users-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/

import React, { Dispatch, SetStateAction } from 'react';
import { EuiForm, EuiFlexGroup, EuiFlexItem, EuiComboBox } from '@elastic/eui';
import { EuiForm, EuiFlexGroup, EuiFlexItem, EuiCompressedComboBox } from '@elastic/eui';
import { ComboBoxOptions } from '../../types';
import { PanelWithHeader } from '../../utils/panel-with-header';
import { FormRow } from '../../utils/form-row';
Expand Down Expand Up @@ -47,7 +47,7 @@ export function InternalUsersPanel(props: {
>
<EuiFlexGroup>
<EuiFlexItem style={{ maxWidth: '400px' }}>
<EuiComboBox
<EuiCompressedComboBox
options={optionUniverse}
selectedOptions={state}
onChange={setState}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
EuiCompressedCheckbox,
EuiCallOut,
EuiBottomBar,
EuiComboBox,
EuiCompressedComboBox,
EuiIcon,
EuiLoadingContent,
} from '@elastic/eui';
Expand Down Expand Up @@ -453,7 +453,7 @@ export function ConfigureTab1(props: AppDependencies) {
>
<EuiFlexGroup>
<EuiFlexItem>
<EuiComboBox
<EuiCompressedComboBox
placeholder={updatedConfiguration.default_tenant}
options={comboBoxOptions}
selectedOptions={selectedComboBoxOptions}
Expand Down

0 comments on commit 69a0f0d

Please sign in to comment.