Docs: clarify numberOfSelectedRecords usage for RECORD_SELECTION items (#21059)

Add a note to the command menu items docs explaining that
RECORD_SELECTION already guarantees a non-empty selection, so
numberOfSelectedRecords > 0 is redundant in
conditionalAvailabilityExpression.
This commit is contained in:
Raphaël Bosi
2026-05-29 17:59:14 +02:00
committed by GitHub
parent 643cfe9b13
commit 0ed2e9d82d

View File

@@ -103,6 +103,10 @@ export default defineCommandMenuItem({
});
```
<Note>
`RECORD_SELECTION` already implies a non-empty selection — use `numberOfSelectedRecords` only for specific counts (e.g. `>= 2`).
</Note>
### Context variables
These represent the current state of the page: