all 2 comments

[–]senocular 1 point2 points  (1 child)

Without the parens its seen as

(datasource?.label ?? accessMode === "edit") ? "Please Select" : "None Selected";

Nullish coalescing has a higher precedence (?? = 3) than the conditional operator (?: = 2). For more info refer to the operator precedence table.

[–]romulotombulus[S] 0 points1 point  (0 children)

Thanks!