mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 08:25:44 +01:00
make placeholders overwritable
This commit is contained in:
@@ -30,6 +30,7 @@ type Props = WithTranslation & {
|
|||||||
filter: (p: string) => void;
|
filter: (p: string) => void;
|
||||||
value?: string;
|
value?: string;
|
||||||
testId?: string;
|
testId?: string;
|
||||||
|
placeholder?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
type State = {
|
type State = {
|
||||||
@@ -70,14 +71,14 @@ class FilterInput extends React.Component<Props, State> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { t, testId } = this.props;
|
const { t, testId, placeholder } = this.props;
|
||||||
return (
|
return (
|
||||||
<form className="input-field" onSubmit={this.handleSubmit} {...createAttributesForTesting(testId)}>
|
<form className="input-field" onSubmit={this.handleSubmit} {...createAttributesForTesting(testId)}>
|
||||||
<div className="control has-icons-left">
|
<div className="control has-icons-left">
|
||||||
<FixedHeightInput
|
<FixedHeightInput
|
||||||
className="input"
|
className="input"
|
||||||
type="search"
|
type="search"
|
||||||
placeholder={t("filterEntries")}
|
placeholder={placeholder || t("filterEntries")}
|
||||||
value={this.state.value}
|
value={this.state.value}
|
||||||
onChange={this.handleChange}
|
onChange={this.handleChange}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user