mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
Rename draggable prop and fix typos
This commit is contained in:
committed by
Shane McDonald
parent
0d7ef709bf
commit
b98544264b
@@ -33,10 +33,10 @@ function CredentialLookup({
|
|||||||
credentialTypeId,
|
credentialTypeId,
|
||||||
credentialTypeKind,
|
credentialTypeKind,
|
||||||
credentialTypeNamespace,
|
credentialTypeNamespace,
|
||||||
draggable,
|
|
||||||
fieldName,
|
fieldName,
|
||||||
helperTextInvalid,
|
helperTextInvalid,
|
||||||
isDisabled,
|
isDisabled,
|
||||||
|
isSelectedDraggable,
|
||||||
isValid,
|
isValid,
|
||||||
label,
|
label,
|
||||||
modalDescription,
|
modalDescription,
|
||||||
@@ -215,7 +215,7 @@ function CredentialLookup({
|
|||||||
dispatch({ type: 'SET_SELECTED_ITEMS', selectedItems })
|
dispatch({ type: 'SET_SELECTED_ITEMS', selectedItems })
|
||||||
}
|
}
|
||||||
multiple={multiple}
|
multiple={multiple}
|
||||||
draggable={draggable}
|
isSelectedDraggable={isSelectedDraggable}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ function OptionsList({
|
|||||||
contentError,
|
contentError,
|
||||||
deselectItem,
|
deselectItem,
|
||||||
displayKey,
|
displayKey,
|
||||||
draggable,
|
|
||||||
header,
|
header,
|
||||||
isLoading,
|
isLoading,
|
||||||
|
isSelectedDraggable,
|
||||||
multiple,
|
multiple,
|
||||||
name,
|
name,
|
||||||
optionCount,
|
optionCount,
|
||||||
@@ -46,7 +46,7 @@ function OptionsList({
|
|||||||
}) {
|
}) {
|
||||||
let selectionPreview = null;
|
let selectionPreview = null;
|
||||||
if (value.length > 0) {
|
if (value.length > 0) {
|
||||||
if (draggable) {
|
if (isSelectedDraggable) {
|
||||||
selectionPreview = (
|
selectionPreview = (
|
||||||
<DraggableSelectedList
|
<DraggableSelectedList
|
||||||
onRemove={deselectItem}
|
onRemove={deselectItem}
|
||||||
@@ -116,7 +116,7 @@ const Item = shape({
|
|||||||
OptionsList.propTypes = {
|
OptionsList.propTypes = {
|
||||||
deselectItem: func.isRequired,
|
deselectItem: func.isRequired,
|
||||||
displayKey: string,
|
displayKey: string,
|
||||||
draggable: bool,
|
isSelectedDraggable: bool,
|
||||||
multiple: bool,
|
multiple: bool,
|
||||||
optionCount: number.isRequired,
|
optionCount: number.isRequired,
|
||||||
options: arrayOf(Item).isRequired,
|
options: arrayOf(Item).isRequired,
|
||||||
@@ -128,7 +128,7 @@ OptionsList.propTypes = {
|
|||||||
value: arrayOf(Item).isRequired,
|
value: arrayOf(Item).isRequired,
|
||||||
};
|
};
|
||||||
OptionsList.defaultProps = {
|
OptionsList.defaultProps = {
|
||||||
draggable: false,
|
isSelectedDraggable: false,
|
||||||
multiple: false,
|
multiple: false,
|
||||||
renderItemChip: null,
|
renderItemChip: null,
|
||||||
searchColumns: [],
|
searchColumns: [],
|
||||||
|
|||||||
@@ -24,11 +24,11 @@ const RemoveActionSection = styled(DataListAction)`
|
|||||||
|
|
||||||
function DraggableSelectedList({ selected, onRemove, onRowDrag }) {
|
function DraggableSelectedList({ selected, onRemove, onRowDrag }) {
|
||||||
const [liveText, setLiveText] = useState('');
|
const [liveText, setLiveText] = useState('');
|
||||||
const [id, setId] = React.useState('');
|
const [id, setId] = useState('');
|
||||||
|
|
||||||
const onDragStart = newId => {
|
const onDragStart = newId => {
|
||||||
setId(newId);
|
setId(newId);
|
||||||
setLiveText(t`Dragging tarted for item id: ${newId}.`);
|
setLiveText(t`Dragging started for item id: ${newId}.`);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onDragMove = (oldIndex, newIndex) => {
|
const onDragMove = (oldIndex, newIndex) => {
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ function OrganizationFormFields({
|
|||||||
onChange={handleCredentialUpdate}
|
onChange={handleCredentialUpdate}
|
||||||
value={galaxyCredentialsField.value}
|
value={galaxyCredentialsField.value}
|
||||||
multiple
|
multiple
|
||||||
draggable
|
isSelectedDraggable
|
||||||
fieldName="galaxy_credentials"
|
fieldName="galaxy_credentials"
|
||||||
modalDescription={
|
modalDescription={
|
||||||
<>
|
<>
|
||||||
|
|||||||
Reference in New Issue
Block a user