Skip to content

Commit

Permalink
Modify the button of selectable component to fix the title overflow i…
Browse files Browse the repository at this point in the history
…ssue (#6465)

* Modify the button of selectable component to fix the title overflow issue

Signed-off-by: Yuanqi(Ella) Zhu <zhyuanqi@amazon.com>

* update snapshot

Signed-off-by: Yuanqi(Ella) Zhu <zhyuanqi@amazon.com>

---------

Signed-off-by: Yuanqi(Ella) Zhu <zhyuanqi@amazon.com>
(cherry picked from commit b619ccb)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
github-actions[bot] committed Apr 16, 2024
1 parent 074f146 commit 9c0937d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.dataSourceComponentButtonTitle {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: auto;
max-width: 16ch;
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ import { SavedObject } from '../../../../../core/public';
import { DataSourceAttributes } from '../../types';
import { DataSourceGroupLabelOption, DataSourceOption } from '../data_source_menu/types';
import { DataSourceItem } from '../data_source_item';
import './data_source_selectable.scss';
import { DataSourceDropDownHeader } from '../drop_down_header';
import '../button_title.scss';
import './data_source_selectable.scss';

interface DataSourceSelectableProps {
savedObjectsClient: SavedObjectsClientContract;
Expand Down Expand Up @@ -234,7 +235,7 @@ export class DataSourceSelectable extends React.Component<
const button = (
<>
<EuiButtonEmpty
className="euiHeaderLink"
className={'euiHeaderLink dataSourceComponentButtonTitle'}
onClick={this.onClick.bind(this)}
data-test-subj="dataSourceSelectableContextMenuHeaderLink"
aria-label={i18n.translate('dataSourceSelectable.dataSourceOptionsButtonAriaLabel', {
Expand Down

0 comments on commit 9c0937d

Please sign in to comment.