Skip to content

Commit

Permalink
fix(ListPro): update no result (#1723)
Browse files Browse the repository at this point in the history
* fix(ListPro): update no result

* test: eslint issue

Co-authored-by: Zhang Rui <zhangrui@growingio.com>
  • Loading branch information
Ryan Zhang and Zhang Rui committed Dec 22, 2021
1 parent dd71457 commit 04d08cf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/legacy/list-pro/core.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ interface State {
stateChanged: boolean;
}

const getLocale = () => localStorage.getItem('locale') || 'zh-CN';

const isEnLocale = () => getLocale().includes('en');

class SelectCore extends React.Component<SelectCoreProps & ConfigConsumerProps, State> {
public static defaultProps: Partial<SelectCoreProps & ConfigConsumerProps> = {
showSearch: true,
Expand All @@ -19,7 +23,7 @@ class SelectCore extends React.Component<SelectCoreProps & ConfigConsumerProps,
isLoading: false,
required: false,
rowHeight: 44,
emptyPlaceholder: '没有找到相关结果',
emptyPlaceholder: isEnLocale() ? 'No Result' : '没有找到相关结果',
};

constructor(props: SelectCoreProps & ConfigConsumerProps) {
Expand Down

1 comment on commit 04d08cf

@vercel
Copy link

@vercel vercel bot commented on 04d08cf Dec 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.