diff --git a/src/application/components/appliers_list/appliers_list.tsx b/src/application/components/appliers_list/appliers_list.tsx index 39bf0be..e9c4617 100644 --- a/src/application/components/appliers_list/appliers_list.tsx +++ b/src/application/components/appliers_list/appliers_list.tsx @@ -33,7 +33,7 @@ export class AppliersList extends Component {
    {...appliersList} - {!appliersList || 'Пока никого нет'} + {appliersList && appliersList.length === 0 && 'Пока никого нет'}
); diff --git a/src/application/components/loading_screen/loading_screen.tsx b/src/application/components/loading_screen/loading_screen.tsx index 13e3365..22db43a 100644 --- a/src/application/components/loading_screen/loading_screen.tsx +++ b/src/application/components/loading_screen/loading_screen.tsx @@ -3,6 +3,6 @@ import * as vdom from '@/modules/vdom/virtual_dom'; export class LoadingScreen extends Component { render() { - return
Загружаем...
; + return
; } } diff --git a/src/application/components/search_bar/search_bar.tsx b/src/application/components/search_bar/search_bar.tsx index 4caf99a..aaae160 100644 --- a/src/application/components/search_bar/search_bar.tsx +++ b/src/application/components/search_bar/search_bar.tsx @@ -28,6 +28,7 @@ export class SearchBar extends Component { onFocusOut={this.props.onFocusOut} onInput={this.props.onInput} name="searchQuery" + autocomplete="off" /> ); diff --git a/src/application/pages/profile_page/profile_page.tsx b/src/application/pages/profile_page/profile_page.tsx index 48c804f..a07218b 100644 --- a/src/application/pages/profile_page/profile_page.tsx +++ b/src/application/pages/profile_page/profile_page.tsx @@ -83,14 +83,7 @@ export class ProfilePage extends Component { } this.isMyProfile = userData.id === this.userId && userData.userType === this.userType; } - const profileData = profileStore.getData(); - if ( - (!profileData.profileLoaded || - !profileData.userProfile || - profileData.userProfile.id !== this.userId || - profileData.userType !== this.userType) && - !this.invokedLoadingProfile - ) { + if (!this.invokedLoadingProfile) { profileActionCreators.loadProfile(this.userType, this.userId); this.invokedLoadingProfile = true; } else { diff --git a/src/application/validators/validators.ts b/src/application/validators/validators.ts index 98a90a1..79bad4c 100644 --- a/src/application/validators/validators.ts +++ b/src/application/validators/validators.ts @@ -45,11 +45,12 @@ export function validateRequired(value: string): FormValue { } export function validateNumeric(value: string): FormValue { - const isValid = /^\d+[\.\d]\d+$/.test(value); + let isValid = /^\d+$/.test(value); + isValid = isValid && parseInt(value, 10) > 0; return { value, isValid, - errorMsg: isValid ? '' : 'Сюда нужно ввести число', + errorMsg: isValid ? '' : 'Сюда нужно ввести целое положительное число', }; }