mirror of
https://github.com/element-hq/element-web.git
synced 2024-11-30 23:31:28 +03:00
Add Droppable to GroupView
to contain the GroupTiles as Draggables
This commit is contained in:
parent
b626420eb9
commit
74c8a74e7d
1 changed files with 8 additions and 1 deletions
|
@ -17,6 +17,7 @@ limitations under the License.
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import GeminiScrollbar from 'react-gemini-scrollbar';
|
import GeminiScrollbar from 'react-gemini-scrollbar';
|
||||||
|
import { Droppable } from 'react-beautiful-dnd';
|
||||||
import sdk from '../../index';
|
import sdk from '../../index';
|
||||||
import { _t } from '../../languageHandler';
|
import { _t } from '../../languageHandler';
|
||||||
import dis from '../../dispatcher';
|
import dis from '../../dispatcher';
|
||||||
|
@ -74,7 +75,13 @@ export default withMatrixClient(React.createClass({
|
||||||
contentHeader = groupNodes.length > 0 ? <h3>{ _t('Your Communities') }</h3> : <div />;
|
contentHeader = groupNodes.length > 0 ? <h3>{ _t('Your Communities') }</h3> : <div />;
|
||||||
content = groupNodes.length > 0 ?
|
content = groupNodes.length > 0 ?
|
||||||
<GeminiScrollbar className="mx_MyGroups_joinedGroups">
|
<GeminiScrollbar className="mx_MyGroups_joinedGroups">
|
||||||
|
<Droppable droppableId="my-groups-droppable" type="draggable-TagTile">
|
||||||
|
{ (provided, snapshot) => (
|
||||||
|
<div ref={provided.innerRef}>
|
||||||
{ groupNodes }
|
{ groupNodes }
|
||||||
|
</div>
|
||||||
|
) }
|
||||||
|
</Droppable>
|
||||||
</GeminiScrollbar> :
|
</GeminiScrollbar> :
|
||||||
<div className="mx_MyGroups_placeholder">
|
<div className="mx_MyGroups_placeholder">
|
||||||
{ _t(
|
{ _t(
|
||||||
|
|
Loading…
Reference in a new issue