-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
move service unit filter next to basic search in leases view #477
Changes from 6 commits
fa4f9de
868219b
33e3f52
b0255bd
f237ac0
c25f591
2eb25dc
8bc1fdb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,7 +105,7 @@ class Search extends PureComponent<Props, State> { | |
newState.municipalityOptions = getFieldOptions(props.leaseAttributes, LeaseFieldPaths.MUNICIPALITY); | ||
newState.tenantTypeOptions = getFieldOptions(props.leaseAttributes, LeaseTenantContactSetFieldPaths.TYPE, false); | ||
newState.typeOptions = getFieldOptions(props.leaseAttributes, LeaseFieldPaths.TYPE); | ||
newState.serviceUnitOptions = getFieldOptions(props.leaseAttributes, 'service_unit', true); | ||
//newState.serviceUnitOptions = getFieldOptions(props.leaseAttributes, 'service_unit', true); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
} | ||
|
||
if(props.lessors !== state.lessors) { | ||
|
@@ -737,28 +737,6 @@ class Search extends PureComponent<Props, State> { | |
/> | ||
</SearchInputColumn> | ||
</SearchRow> | ||
|
||
<SearchRow> | ||
<SearchLabelColumn> | ||
<SearchLabel>Palvelukokonaisuus</SearchLabel> | ||
</SearchLabelColumn> | ||
<SearchInputColumn> | ||
<FormField | ||
autoBlur | ||
disableDirty | ||
fieldAttributes={{ | ||
label: 'Palvelukokonaisuus', | ||
type: FieldTypes.CHOICE, | ||
read_only: false, | ||
}} | ||
invisibleLabel | ||
name='service_unit' | ||
overrideValues={{ | ||
options: serviceUnitOptions, | ||
}} | ||
/> | ||
</SearchInputColumn> | ||
</SearchRow> | ||
</Column> | ||
</Row> | ||
</Fragment> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest two possible options for renaming
componentToRenderUnderLabel
:componentToRenderUnderTitle
: The p element above is not a label but a title. I was a bit confused about where there should be a label.serviceUnitFilterComponent
: Describes more clearly about what the component is. There are no other components to be rendered in this position, so I think it is fine to state it more explicitly what component is rendered there.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed it to componentToRenderUnderTitle. Though serviceUnitFilterComponent tells more in this use case, I still think the TableFilter component does not have to know what React component is being injected.