make perspective dropdown bigger (#403)

Co-authored-by: burnettk <burnettk@users.noreply.github.com>
This commit is contained in:
Kevin Burnett 2023-07-25 10:25:11 -07:00 committed by GitHub
parent a18cf04b46
commit 6d11fb915e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 25 deletions

View File

@ -30,7 +30,7 @@ export default function Filters({
let reportSearchSection = null;
if (reportSearchComponent) {
reportSearchSection = (
<Column sm={2} md={4} lg={7}>
<Column sm={3} md={7} lg={15}>
{reportSearchComponent()}
</Column>
);

View File

@ -1702,7 +1702,7 @@ export default function ProcessInstanceListTable({
const reportSearchComponent = () => {
if (showReports) {
const columns = [
<Column sm={2} md={4} lg={7}>
<Column sm={4} md={8} lg={16}>
<ProcessInstanceReportSearch
onChange={processInstanceReportDidChange}
selectedItem={processInstanceReportSelection}

View File

@ -1,11 +1,11 @@
import { useEffect, useState } from 'react';
import {
ComboBox,
Stack,
Grid,
Column,
FormLabel,
// @ts-ignore
} from '@carbon/react';
import { truncateString } from '../helpers';
import { ProcessInstanceReport } from '../interfaces';
import HttpService from '../services/HttpService';
@ -53,9 +53,7 @@ export default function ProcessInstanceReportSearch({
const reportSelectionString = (
processInstanceReport: ProcessInstanceReport
) => {
return `${truncateString(processInstanceReport.identifier, 20)} (Id: ${
processInstanceReport.id
})`;
return `${processInstanceReport.identifier} (Id: ${processInstanceReport.id})`;
};
const shouldFilterProcessInstanceReport = (options: any) => {
@ -70,24 +68,28 @@ export default function ProcessInstanceReportSearch({
if (reportsAvailable()) {
return (
<Stack orientation="horizontal" gap={2}>
<FormLabel className="with-top-margin">{titleText}</FormLabel>
<ComboBox
onChange={onChange}
id="process-instance-report-select"
data-qa="process-instance-report-selection"
items={processInstanceReports}
itemToString={(processInstanceReport: ProcessInstanceReport) => {
if (processInstanceReport) {
return reportSelectionString(processInstanceReport);
}
return null;
}}
shouldFilterItem={shouldFilterProcessInstanceReport}
placeholder="Choose a process instance perspective"
selectedItem={selectedItem}
/>
</Stack>
<Grid fullWidth condensed>
<Column sm={2} md={3} lg={3}>
<FormLabel className="with-top-margin">{titleText}</FormLabel>
</Column>
<Column sm={2} md={5} lg={13}>
<ComboBox
onChange={onChange}
id="process-instance-report-select"
data-qa="process-instance-report-selection"
items={processInstanceReports}
itemToString={(processInstanceReport: ProcessInstanceReport) => {
if (processInstanceReport) {
return reportSelectionString(processInstanceReport);
}
return null;
}}
shouldFilterItem={shouldFilterProcessInstanceReport}
placeholder="Choose a process instance perspective"
selectedItem={selectedItem}
/>
</Column>
</Grid>
);
}
return null;