* client: fix page scrolling on adding/deleting leases
This commit is contained in:
committed by
Simon Zolin
parent
6f2503a09f
commit
2976726f99
@@ -50,7 +50,6 @@ const Form = (props) => {
|
||||
type="text"
|
||||
className="form-control"
|
||||
placeholder={t('form_enter_hostname')}
|
||||
validate={[required]}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,9 +18,10 @@ class StaticLeases extends Component {
|
||||
this.props.addStaticLease(data);
|
||||
}
|
||||
|
||||
handleDelete = (ip, mac, hostname) => {
|
||||
handleDelete = (ip, mac, hostname = '') => {
|
||||
const name = hostname || ip;
|
||||
// eslint-disable-next-line no-alert
|
||||
if (window.confirm(this.props.t('delete_confirm', { key: hostname }))) {
|
||||
if (window.confirm(this.props.t('delete_confirm', { key: name }))) {
|
||||
this.props.removeStaticLease({ ip, mac, hostname });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user