sortedByAvailability

Returns a new list with commands available for action first, followed by unavailable ones. The sort is stable, so the original order is preserved within each availability group.

Parameters

action

The composer action currently active, or null when the composer is in its default state.