Skip to end of banner
Go to start of banner

Dual List Selector

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 45 Next »

See also: Data Tables

Description

A dual list selector is a component allowing the user to select multiple items. It is especially useful when the number of available items is large.

The most common use of the dual list selector is a column picker, used in data tables. For this reason, this document describes the structure and function on a column picker.

Usage & Behaviour

General guidelines

  • The dual list selector appears in a dialog box

  • It is triggered by clicking the Columns action in the column Action Menu

Structure

  • The component contains two lists:

    • Available Columns (on the left): a list of all columns available for the table

    • Selected Columns (on the right): a list of the currently displayed columns

  • Between the two lists there is a set of buttons, allowing the user to move items between them

  • Under the selected columns list there is a set of buttons, allowing the user the reorder selected items

  • Next to the selected columns title there is an indicator, showing the number of selected items out of the total number of items (for example: 7/22)

  • At the top of each list a search bar may appear, allowing the user to quickly locate specific items. The search bar is optional, depending on the number of items

  • In case the list is too long to be displayed in its container, a vertical scroll bar appears

  • At the bottom-left corner of the dialog box there is a button titled Restore Defaults

Order

  • The Selected Columns list shows the list of columns in the same order as they appear on the data table

  • The Available Columns list is sorted alphanumerically

States

  • The right and left buttons are disabled until the user selected at least one item: selecting items on the right enables the left button, and vice versa

  • The up and down buttons are disabled until the user selected at least one item on the Selected Columns list:

    • Selecting the top item will enable only the down button

    • Selecting the bottom item will enable only the up button

    • Selecting any other item will enable both the up and down buttons

  • If the table contain columns that cannot be removed or reordered, the relevant items on the selected columns list will show as disabled

Interaction

Selecting Items

  • On either list, clicking an item selects it. The user can select more than one item using the Ctrl (or Command) key for discrete selection, or the Shift key for a block selection

  • Selecting items on one list deselects all items on the other list

Moving items between lists

  • The user can move selected items between lists using one of two methods:

    • Clicking the right or left button between the lists

    • Using drag and Drop

  • Items that were moved to the Selected Columns list appears at the bottom of the list

  • Items that were moved to the Available Columns list appear at their original locations, so the list is always sorted

  • Items that were moved remain selected

  • In addition, moved items should be visible. In case the target area is outside of the visible area of the list, it will scroll automatically

Reordering items

  • On the Selected Columns list, the user can reorder items by selecting them and then clicking the up or down buttons under the list. In this case, reordering multiple items will keep their relative locations (i.e. including gaps between items, if exists)

  • The user can also reorder items using /wiki/spaces/~347593403/pages/918783940. In this case, when reordering multiple items they will be clustered

  • After the items were ordered they remain selected until the user selects other items

Restoring Defaults

  • Clicking the Restore Defaults button restores the dialog box to its original state (“factory default”)

  • After clicking the button the user can confirm the action by clicking the Done button, or to cancel

Locking columns (optional)

  • The user can lock any column on the selected columns list by clicking the pin icon, shown on hover. In this case:

    • The icon changes from idle to selected

    • The item moves to the top of the list

    • The item can be ordered only inside the group of locked items

    • On the actual table the locked columns are anchored to the left. Locked items can be reordered only inside the group of locked items

  • The user can unlock the column by clicking the lock icon again

Validation and Errors

Removing All Items

  • If the user removed all items from the Selected Columns list:

    • The search bar and reordering buttons get disabled

    • A message appears inside the container, guiding the user to select at least one item

  • In this case, clicking the Done button:

    • Shows an error message at the bottom of the dialog

    • Disables the button

Limiting the Number of Items

  • It is recommended to limit the number of selected items, depending on common usage and system performance

  • In this case, the maximum number of items will be presented within the indicator at the top of the Selected Columns list, regardless of the number of available columns

  • If the user reached the maximum number of items:

    • The right arrow button will be disabled

    • Dragging items from the Available Columns list will be disabled

    • A relevant message will appear at the bottom of the popup

Accessibility compliance

Unless otherwise specified, see our general compliance information in Fundamentals - Accessibility

Design

Zeplin link

Screen thumbnail

https://zpl.io/2j6oopW

Code

  • No labels