Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: expand maxWidth allow more humanName chars #764

Merged
merged 11 commits into from
Feb 12, 2021
13 changes: 12 additions & 1 deletion src/app/views/sidebar/sample-queries/SampleQueries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,17 @@ export class SampleQueries extends Component<ISampleQueriesProps, any> {
);
}

let maxWidthOfHumanName = 180;
if (window.innerWidth > 1280) {
maxWidthOfHumanName = 300;
}

window.onresize = () => {
if (window.innerWidth > 1280) {
maxWidthOfHumanName = 300;
}
};

const columns = [
{
key: 'authRequiredIcon',
Expand All @@ -376,7 +387,7 @@ export class SampleQueries extends Component<ISampleQueriesProps, any> {
name: '',
fieldName: 'humanName',
minWidth: 100,
maxWidth: 180,
maxWidth: maxWidthOfHumanName,
},
{
key: 'button',
Expand Down