Updated ShortUrlsFilteringBar test

This commit is contained in:
Alejandro Celaya
2022-05-14 16:36:45 +02:00
parent 30aeba0af2
commit ed366fa4cc
4 changed files with 82 additions and 102 deletions

View File

@@ -60,7 +60,7 @@ const ShortUrlsFilteringBar = (
<TagsSelector allowNew={false} placeholder="With tags..." selectedTags={tags} onChange={changeTagSelection} />
{canChangeTagsMode && tags.length > 1 && (
<>
<Button outline color="secondary" onClick={toggleTagsMode} id="tagsModeBtn">
<Button outline color="secondary" onClick={toggleTagsMode} id="tagsModeBtn" aria-label="Change tags mode">
<FontAwesomeIcon className="short-urls-filtering-bar__tags-icon" icon={tagsMode === 'all' ? faTags : faTag} />
</Button>
<UncontrolledTooltip target="tagsModeBtn" placement="left">

View File

@@ -20,7 +20,6 @@ export function OrderingDropdown<T extends string = string>(
) {
const handleItemClick = (fieldKey: T) => () => {
const newOrderDir = determineOrderDir(fieldKey, order.field, order.dir);
onChange(newOrderDir ? fieldKey : undefined, newOrderDir);
};

View File

@@ -1,5 +1,6 @@
import DateInput from '../DateInput';
import { DateRange } from './types';
import { endOfDay } from 'date-fns';
interface DateRangeRowProps extends DateRange {
onStartDateChange: (date: Date | null) => void;
@@ -29,7 +30,7 @@ const DateRangeRow = (
isClearable
minDate={startDate ?? undefined}
disabled={disabled}
onChange={onEndDateChange}
onChange={(date) => onEndDateChange(date && endOfDay(date))}
/>
</div>
</div>