Skip to content

Commit 0d65469

Browse files
committed
crumbs behavior change. Not tied to panel open/close anymore
1 parent 509ea2c commit 0d65469

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

front/src/containers/AggDropDown/CustomDrop.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ class CustomDropDown extends React.Component<CustomDropDownProps, CustomDropDown
334334
};
335335
componentDidMount = () => {
336336
if (this.props.field.defaultToOpen === true) {
337-
this.setState({ showItems: true, showAdditionalCrumbs: true });
337+
this.setState({ showItems: true });
338338
this.props.handleLoadMore()
339339

340340
}

front/src/containers/AggDropDown/CustomDropCrumbs.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,17 @@ class CustomDropCrumbs extends React.Component<CustomDropCrumbsProps, CustomDrop
123123
let chevronDirection = this.state.showAdditionalCrumbs ? 'left' : 'right';
124124
if (this.state.showAdditionalCrumbs) {
125125
let otherCrumbs: any[] = this.props.selectedItems.slice(field.maxCrumbs, this.props.selectedItems.length)
126+
otherCrumbs.push({key:"<" })
126127
return otherCrumbs.map(item => {
128+
if(item.key=="<"){
129+
return (
130+
<div className='select-box--crumb-container' key={item.key}>
131+
<FontAwesome
132+
className={`chevron-${chevronDirection} crumb-icon`}
133+
name={`chevron-${chevronDirection}`}
134+
onClick={() => this.setState({ showAdditionalCrumbs: !this.state.showAdditionalCrumbs })}
135+
/>
136+
</div>)}
127137
return (
128138
<div className='select-box--crumb-container' key={item.key}>
129139
{item.key}

0 commit comments

Comments
 (0)