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

Signed-off-by: Yuanqi(Ella) Zhu <zhyuanqi@amazon.com>
  • Loading branch information
zhyuanqi committed Apr 15, 2024
1 parent 476cffc commit d1ddf0d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.buttonTitle {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: auto;
max-width: 16ch;
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { LocalCluster } from '../data_source_selector/data_source_selector';
import { SavedObject } from '../../../../../core/public';
import { DataSourceAttributes } from '../../types';
import { DataSourceGroupLabelOption, DataSourceOption } from '../data_source_menu/types';
import '../button_title.scss';

interface DataSourceSelectableProps {
savedObjectsClient: SavedObjectsClientContract;
Expand Down Expand Up @@ -237,6 +238,7 @@ export class DataSourceSelectable extends React.Component<
iconSide="left"
size="s"
disabled={this.props.disabled || false}
textProps={{ className: 'buttonTitle' }}
>
{this.state.selectedOption &&
this.state.selectedOption.length > 0 &&
Expand Down

0 comments on commit d1ddf0d

Please sign in to comment.