Factorisation de l'ouverture/fermeture d'une colonne
This commit is contained in:
parent
e3459d136e
commit
fbad143bed
|
@ -199,7 +199,7 @@ export class BoardPage extends React.Component<BoardPageProps> {
|
|||
{lane.title}
|
||||
</h3>
|
||||
<button className="button is-light level-item is-small expand"
|
||||
onClick={(e) => { console.log(e.currentTarget.parentNode.parentNode.parentNode.parentNode.parentNode.classList.toggle('minimized'))}}>
|
||||
onClick={this.onMinimizeColumn}>
|
||||
<span className="icon">
|
||||
<i className="fas fa-chevron-right" aria-hidden="true"></i>
|
||||
</span>
|
||||
|
@ -213,7 +213,7 @@ export class BoardPage extends React.Component<BoardPageProps> {
|
|||
</span>
|
||||
</button>
|
||||
<button className="button is-light level-item is-small"
|
||||
onClick={(e) => { console.log(e.currentTarget.parentNode.parentNode.parentNode.parentNode.parentNode.classList.toggle('minimized'))}}>
|
||||
onClick={this.onMinimizeColumn}>
|
||||
<span className="icon">
|
||||
<i className="fas fa-chevron-left" aria-hidden="true"></i>
|
||||
</span>
|
||||
|
@ -224,6 +224,10 @@ export class BoardPage extends React.Component<BoardPageProps> {
|
|||
)
|
||||
}
|
||||
|
||||
onMinimizeColumn(e: any) {
|
||||
e.currentTarget.closest('.react-kanban-column').classList.toggle('minimized');
|
||||
}
|
||||
|
||||
onCardDragEnd(b: any, card: any, source: any, dest: any) {
|
||||
const { board } = this.props;
|
||||
this.props.dispatch(moveCard(
|
||||
|
|
Loading…
Reference in New Issue