Skip to content

Commit

Permalink
Fix: expand maxWidth allow more humanName chars (#764)
Browse files Browse the repository at this point in the history
* add maxwidth stretch to 300 instead of 180 in columns

* make maxWidth for humanName dynamic

* allow window resize listener

* lint
  • Loading branch information
ezkemboi committed Feb 12, 2021
1 parent 5f5246e commit 74d0401
Showing 1 changed file with 12 additions and 1 deletion.
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

0 comments on commit 74d0401

Please sign in to comment.