Fixed reactstrap 9 deprecated warnings

This commit is contained in:
Alejandro Celaya
2022-03-11 16:37:41 +01:00
parent a8f996bec7
commit c4148f0494
11 changed files with 12 additions and 14 deletions

View File

@@ -22,7 +22,7 @@ export const DropdownBtn: FC<DropdownBtnProps> = (
return (
<Dropdown isOpen={isOpen} toggle={toggle} disabled={disabled} className={dropdownClassName}>
<DropdownToggle caret className={toggleClasses} color="primary">{text}</DropdownToggle>
<DropdownMenu className="w-100" right={right} style={style}>{children}</DropdownMenu>
<DropdownMenu className="w-100" end={right} style={style}>{children}</DropdownMenu>
</Dropdown>
);
};

View File

@@ -15,6 +15,6 @@ export const DropdownBtnMenu: FC<DropdownBtnMenuProps> = ({ isOpen, toggle, chil
<DropdownToggle size="sm" caret outline className="dropdown-btn-menu__dropdown-toggle">
&nbsp;<FontAwesomeIcon icon={menuIcon} />&nbsp;
</DropdownToggle>
<DropdownMenu right={right}>{children}</DropdownMenu>
<DropdownMenu end={right}>{children}</DropdownMenu>
</ButtonDropdown>
);

View File

@@ -37,7 +37,7 @@ const Message: FC<MessageProps> = ({ className, children, loading = false, type
});
return (
<Row noGutters className={className}>
<Row className={classNames('g-0', className)}>
<div className={classes}>
<Card className={getClassForType(type)} body>
<h3 className={classNames('text-center mb-0', getTextClassForType(type))}>

View File

@@ -35,7 +35,7 @@ export function OrderingDropdown<T extends string = string>(
{isButton && order.field && `Order by: "${items[order.field]}" - "${order.dir ?? 'DESC'}"`}
</DropdownToggle>
<DropdownMenu
right={right}
end={right}
className={classNames('w-100', { 'ordering-dropdown__menu--link': !isButton })}
>
{toPairs(items).map(([ fieldKey, fieldValue ]) => (

View File

@@ -9,10 +9,8 @@ interface PaginationDropdownProps {
const PaginationDropdown = ({ toggleClassName, ranges, value, setValue }: PaginationDropdownProps) => (
<UncontrolledDropdown>
<DropdownToggle caret color="link" className={toggleClassName}>
Paginate
</DropdownToggle>
<DropdownMenu right>
<DropdownToggle caret color="link" className={toggleClassName}>Paginate</DropdownToggle>
<DropdownMenu end>
{ranges.map((itemsPerPage) => (
<DropdownItem key={itemsPerPage} active={itemsPerPage === value} onClick={() => setValue(itemsPerPage)}>
<b>{itemsPerPage}</b> items per page