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