refactor
This commit is contained in:
@@ -49,7 +49,7 @@ export const createDocumentsTableHeaderActions = ({
|
||||
? 'Sorting Z → A. Click to switch to ascending.'
|
||||
: 'Sorting A → Z. Click to switch to descending.';
|
||||
|
||||
const includeDescendantsToggle = isFilterActive && typeof onToggleIncludeDescendants === 'function'
|
||||
const includeDescendantsToggle = isFilterActive && onToggleIncludeDescendants
|
||||
? (
|
||||
<button
|
||||
type="button"
|
||||
@@ -66,11 +66,11 @@ export const createDocumentsTableHeaderActions = ({
|
||||
)
|
||||
: null;
|
||||
|
||||
const sortControls = typeof onSortFieldChange === 'function'
|
||||
const sortControls = onSortFieldChange
|
||||
? (
|
||||
<div className="documents-actions__sort-group">
|
||||
<SortFieldQuickMenu sortField={sortField} onChange={onSortFieldChange} />
|
||||
{typeof onSortDirectionToggle === 'function' ? (
|
||||
{onSortDirectionToggle ? (
|
||||
<button
|
||||
type="button"
|
||||
className="icon-button documents-toolbar__toggle documents-sort__direction"
|
||||
|
||||
Reference in New Issue
Block a user