mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-29 05:00:43 +10:00
Fix minor bug in SelectMultipleFilter on desktop.
Rerendering lost dirty values when hovering on ListingCard.
This commit is contained in:
parent
38cb342999
commit
72adafb895
3 changed files with 11 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import React, { Component } from 'react';
|
||||
import { bool, func, node, string } from 'prop-types';
|
||||
import { bool, func, node, object, string } from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import { injectIntl, intlShape, FormattedMessage } from 'react-intl';
|
||||
|
||||
|
|
@ -45,6 +45,7 @@ class FilterPlainComponent extends Component {
|
|||
isSelected,
|
||||
children,
|
||||
initialValues,
|
||||
keepDirtyOnReinitialize,
|
||||
contentPlacementOffset,
|
||||
} = this.props;
|
||||
const classes = classNames(rootClassName || css.root, className);
|
||||
|
|
@ -74,6 +75,7 @@ class FilterPlainComponent extends Component {
|
|||
contentPlacementOffset={contentPlacementOffset}
|
||||
onChange={this.handleChange}
|
||||
initialValues={initialValues}
|
||||
keepDirtyOnReinitialize={keepDirtyOnReinitialize}
|
||||
>
|
||||
{children}
|
||||
</FilterForm>
|
||||
|
|
@ -88,6 +90,7 @@ FilterPlainComponent.defaultProps = {
|
|||
className: null,
|
||||
plainClassName: null,
|
||||
initialValues: null,
|
||||
keepDirtyOnReinitialize: false,
|
||||
};
|
||||
|
||||
FilterPlainComponent.propTypes = {
|
||||
|
|
@ -99,6 +102,8 @@ FilterPlainComponent.propTypes = {
|
|||
label: node.isRequired,
|
||||
isSelected: bool.isRequired,
|
||||
children: node.isRequired,
|
||||
initialValues: object,
|
||||
keepDirtyOnReinitialize: bool,
|
||||
|
||||
// form injectIntl
|
||||
intl: intlShape.isRequired,
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ class FilterPopup extends Component {
|
|||
isSelected,
|
||||
children,
|
||||
initialValues,
|
||||
keepDirtyOnReinitialize,
|
||||
contentPlacementOffset,
|
||||
} = this.props;
|
||||
|
||||
|
|
@ -142,6 +143,7 @@ class FilterPopup extends Component {
|
|||
showAsPopup
|
||||
contentPlacementOffset={contentPlacementOffset}
|
||||
initialValues={initialValues}
|
||||
keepDirtyOnReinitialize={keepDirtyOnReinitialize}
|
||||
onSubmit={this.handleSubmit}
|
||||
onCancel={this.handleCancel}
|
||||
onClear={this.handleClear}
|
||||
|
|
@ -161,6 +163,7 @@ FilterPopup.defaultProps = {
|
|||
className: null,
|
||||
popupClassName: null,
|
||||
initialValues: null,
|
||||
keepDirtyOnReinitialize: false,
|
||||
contentPlacementOffset: 0,
|
||||
liveEdit: false,
|
||||
label: null,
|
||||
|
|
@ -174,6 +177,7 @@ FilterPopup.propTypes = {
|
|||
urlParam: string.isRequired,
|
||||
onSubmit: func.isRequired,
|
||||
initialValues: object,
|
||||
keepDirtyOnReinitialize: bool,
|
||||
contentPlacementOffset: number,
|
||||
label: string.isRequired,
|
||||
isSelected: bool.isRequired,
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ class SelectMultipleFilter extends Component {
|
|||
onSubmit={handleSubmit}
|
||||
initialValues={namedInitialValues}
|
||||
urlParam={urlParam}
|
||||
keepDirtyOnReinitialize
|
||||
{...rest}
|
||||
>
|
||||
<GroupOfFieldCheckboxes
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue