chore: liner

This commit is contained in:
Wroud
2020-10-05 02:38:46 +03:00
parent edf5e5eed8
commit 18098b3034
3 changed files with 7 additions and 5 deletions
@@ -52,11 +52,11 @@ export const DatabaseList = observer(function DatabaseList({
const placeholderMessage = isSearched ? 'ui_no_matches_placeholder' : 'connections_administration_search_database_tip';
return styled(styles)(
<SubmittingForm onSubmit={onSearch} className={className}>
<SubmittingForm className={className} onSubmit={onSearch}>
<ItemList>
<ItemListSearch value={hosts} placeholder={translate('connections_administration_search_database_tip')} onChange={onChange} onSearch={searchHandler} disabled={disabled}/>
<ItemListSearch value={hosts} placeholder={translate('connections_administration_search_database_tip')} disabled={disabled} onChange={onChange} onSearch={searchHandler} />
{databases.map(database => (
<Database key={database.host + database.port} database={database} onSelect={onSelect}/>
<Database key={database.host + database.port} database={database} onSelect={onSelect} />
))}
</ItemList>
{!databases.length && <TextPlaceholder>{translate(placeholderMessage)}</TextPlaceholder>}
@@ -37,10 +37,10 @@ export const SearchDatabase = observer(function SearchDatabase({
databases={databases}
hosts={hosts}
disabled={disabled}
className={className}
onSelect={onSelect}
onChange={onChange}
onSearch={onSearch}
className={className}
/>
);
});
+3 -1
View File
@@ -55,7 +55,9 @@ export class DIContainer implements IServiceInjector, IServiceCollection {
this.container.bind(Ctor).toSelf();
}
addServiceByToken<T extends object>(token: InjectionToken<T>, value: T | IServiceConstructor<T>): void {
addServiceByToken<T extends Record<string, any>>(
token: InjectionToken<T>, value: T | IServiceConstructor<T>
): void {
if (isConstructor(value)) {
this.container.bind(token).to(value as IServiceConstructor<T>);
} else {