Skip to content

Commit

Permalink
Merge pull request #2133 from glific/bug/flow-name-undefined
Browse files Browse the repository at this point in the history
Fixed flow name undefined and removal of extra isActive column
  • Loading branch information
kurund authored Aug 26, 2022
2 parents 82e2e25 + 68d974c commit 1bf943d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/UI/Pager/Pager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
import { setColumnToBackendTerms } from 'common/constants';
import styles from './Pager.module.css';

const removeDisplayColumns = ['recordId', 'translations', 'id', 'isActive'];
interface PagerProps {
columnNames: Array<any>;
removeSortBy: Array<any>;
Expand Down Expand Up @@ -83,7 +84,7 @@ const createRows = (
let stylesIndex = -1;
return Object.keys(entry).map((item: any) => {
// let's not display recordId in the UI
if (item === 'recordId' || item === 'translations' || item === 'id') {
if (removeDisplayColumns.includes(item)) {
return null;
}
// maintain columnStyles index
Expand Down
6 changes: 5 additions & 1 deletion src/containers/List/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,11 @@ export const List: React.SFC<ListProps> = ({
// currently we don't allow edit or delete for reserved items. hence return early
const { id, label, name, isReserved } = item;

const labelValue = label !== null ? label : name;
let labelValue = label;

if (name) {
labelValue = name;
}

if (isReserved) {
return null;
Expand Down

0 comments on commit 1bf943d

Please sign in to comment.