How to use the react-sortable-hoc.SortableHandle function in react-sortable-hoc

To help you get started, we’ve selected a few react-sortable-hoc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alibaba / ice / tools / iceworks / renderer / src / pages / Home / ProjectDashboard / index.jsx View on Github external
import './index.scss';

const ExtensionMap = {
  [Assets.extensionName]: Assets,
  [Aliyun.extensionName]: Aliyun,
  [Def.extensionName]: Def,
  [Git.extensionName]: Git,
  [Dependencies.extensionName]: Dependencies,
  [Layouts.extensionName]: Layouts,
  [Pages.extensionName]: Pages,
  [Proxies.extensionName]: Proxies,
  [Todo.extensionName]: Todo,
};

// eslint-disable-next-line babel/new-cap
const DragHandle = SortableHandle(() => (
  <span>
));
// eslint-disable-next-line babel/new-cap
const SortableExtensionItem = SortableElement(
  ({ Component, isSorting, props }) =&gt; {
    return (
      <div>
        
        
      </div>
    );</span>
github SaltieRL / DistributedReplays / webapp / src / Components / Player / Overview / PlayStyle / PlayStyleEdit.tsx View on Github external
import { getChartSettings } from "../../../../Requests/Player/getPlayStyle"
import { getStatsList } from "../../../../Requests/Replay"
import { LoadableWrapper } from "../../../Shared/LoadableWrapper"

interface State {
    settings?: SettingsResponse
    sorted?: string[][]
    stats?: StatDescription[]
}

interface Props {
    onUpdate: () =&gt; void
}

//  Component which uses drag-n-drop activation when clicking inside the component
const DragHandle = SortableHandle(({style}) =&gt; (
    &lt; span style={{...style, ...{cursor: " move "}}}&gt; {" ::: "} )
)

// Universal component for turning a TableBody into a sortable container
const TableBodySortable = SortableContainer(({children, displayRowCheckbox}) =&gt; (
    
        {children}
    
))

const Row = SortableElement(({name, children}) =&gt; {
    return (
github rpgtools / initiate / src / components / reusable / SortableList.jsx View on Github external
import React from 'react';
import {
  SortableContainer,
  SortableElement,
  SortableHandle
} from 'react-sortable-hoc';
import DragHandleImage from '../../images/drag-handle.png';

export const DragHandle = SortableHandle(() =&gt;
  <img alt="::" width="{18}" src="{DragHandleImage}">
);

const SortableItem = SortableElement(({item, ...rest}) =&gt;
  <div>
    {item}
  </div>
);

const SortableList = SortableContainer(({items, ...rest}) =&gt; {
  return (
    <div>
      {items.map((item, index) =&gt; (
        </div>
github spinnaker / deck / app / scripts / modules / amazon / src / loadBalancer / configure / application / ALBListeners.tsx View on Github external
IListenerActionType,
} from 'amazon/domain';
import { AmazonCertificateReader } from 'amazon/certificates/AmazonCertificateReader';
import { IAuthenticateOidcActionConfig, OidcConfigReader } from 'amazon/loadBalancer/OidcConfigReader';

import { ConfigureOidcConfigModal } from './ConfigureOidcConfigModal';
import { AmazonCertificateSelectField } from '../common/AmazonCertificateSelectField';
import { ConfigureRedirectConfigModal } from './ConfigureRedirectConfigModal';

export interface IALBListenersState {
  certificates: { [accountId: number]: IAmazonCertificate[] };
  certificateTypes: string[];
  oidcConfigs: IAuthenticateOidcActionConfig[];
}

const DragHandle = SortableHandle(() =&gt; (
  <span>
));

const defaultAuthAction = {
  authenticateOidcConfig: {
    authorizationEndpoint: '',
    clientId: '',
    issuer: '',
    scope: 'openid',
    sessionCookieName: 'AWSELBAuthSessionCookie',
    tokenEndpoint: '',
    userInfoEndpoint: '',
  },
  type: 'authenticate-oidc',
} as IListenerAction;
</span>
github ktk-2005 / Feedbacker-Forum / client / src / components / survey-creator / survey-create-question.js View on Github external
import React from 'react'
import { SortableElement, SortableHandle } from 'react-sortable-hoc'

const Handle = SortableHandle(() =&gt; (
  <span style="{{">Drag me</span>
))

function SurveyCreateQuestion({
  question,
  edited,
  onSelect,
  onDeselect,
  onDelete,
  onEdit,
  deleted,
  disabledImp: disabled,
}) {
github saadq / resumake.io / app / client / src / features / progress / components / SortableList.js View on Github external
margin: 0 auto;
    width: 0%;
    opacity: 1;
  }
`

const Handle = styled.span`
  position: relative;
  right: 25px;
  color: ${colors.primary};
  opacity: ${props =&gt; (props.disabled ? '0' : '1')};
  cursor: grab;
  user-select: none;
`

const DragHandle = SortableHandle(({ disabled }) =&gt; {
  return ::
})

const Item = styled.div`
  z-index: 2;
  min-width: 80px;
`

const SortableItem = SortableElement(({ value }) =&gt; {
  return (
    
      
      {titleCase(value)}
    
  )
})
github Heigvd / Wegas / wegas-app / src / main / webapp / wegas-react-form / src / Views / array.tsx View on Github external
? this.props.editKey
                : this.props.view.label;

        return (
             this.props.onChildAdd()}
                tooltip={this.props.view.tooltip}
                label={label}
                labelClassName={`${optionLabelStyle}`}
            /&gt;
        );
    }
}
const DragHandle = SortableHandle(() =&gt; (
    <span>
));
const ChildItem = SortableElement(
    (props: IArrayProps &amp; { child: React.ReactNode; updateIndex: number }) =&gt; {
        const valueLength = Array.isArray(props.value) ? props.value.length : 0;
        const { minItems = 0 } = props.schema;
        const disabled = props.view.disabled;
        return (
            <div>
                {!disabled &amp;&amp; props.view.sortable &amp;&amp; }
                <span>
                    {props.child}</span></div></span>
github higlass / higlass / app / scripts / TrackArea.js View on Github external
let Handle = null;

    if (this.moveable) {
      Handle = SortableHandle(() =&gt; (
        <svg height="10px"> {}}
          style={this.getMoveImgStyle()}
          width="10px"
        &gt;
          
        </svg>
      ));
    } else {
      Handle = SortableHandle(() =&gt; <div>);
    }

    return (
      <div style="{{"></div></div>
github Codeinwp / gutenberg-blocks / src / blocks / posts / components / sortable.js View on Github external
const { __ } = wp.i18n;

const {
	IconButton,
	TextControl,
	SelectControl,
	ToggleControl
} = wp.components;

const {
	Fragment,
	useState
} = wp.element;

const DragHandle = SortableHandle( () =&gt; {
	return (
		<div>
			<span></span>
		</div>
	);
});

export const SortableItem = ({
	value,
	disabled,
	getFields,
	toggleFields,
	imageSize,
	titleTag,
	excerptLimit
}) =&gt; {