diff --git a/packages/hippy-react/src/components/list-view.tsx b/packages/hippy-react/src/components/list-view.tsx index 305af4091..0307787b3 100644 --- a/packages/hippy-react/src/components/list-view.tsx +++ b/packages/hippy-react/src/components/list-view.tsx @@ -6,7 +6,6 @@ import PullHeader from './pull-header'; import PullFooter from './pull-footer'; import { callUIFunction } from '../modules/ui-manager-module'; import { warn } from '../utils'; -import { Device } from '../native'; type DataItem = any; @@ -366,17 +365,11 @@ class ListView extends React.Component { } if (typeof getRowType === 'function') { - let type = getRowType(index); - if (type) { - if (typeof type !== 'string') { - type = (type as any).toString(); - } - if (Device.platform.OS === 'android') { - itemProps.itemViewType = type; - } else { - itemProps.type = type; - } + const type = getRowType(index); + if (!Number.isInteger(type)) { + warn('getRowType must returns a number'); } + itemProps.type = type; } if (typeof rowShouldSticky === 'function') {