docs: fix MultiSelect setSelectedOptions setter reference#3021
Merged
Conversation
The setSelectedOptions entry was wrong on four counts: the example used the singular setSelectedOption, the parameter was typed as object instead of array, the description implied a single selection, and the example passed a single object instead of an array. Corrected to document the array parameter type, multiple-selection behavior, and array-based examples (option values, label/value objects, single-value coercion, and clearing with []). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes the
setSelectedOptionssetter reference for the MultiSelect widget. The previous entry was incorrect on four counts:setSelectedOption— MultiSelect exposessetSelectedOptions(plural).object— it takes an array (or a value coerced to one).{ label, value }object — callers should pass an array.Corrected to document the array parameter type, multiple-selection behavior, and array-based examples (option values, label/value objects, single-value coercion, and clearing with
[]). Verified against the Appsmith codebase: the setter maps todefaultOptionValue(typearray, accessorselectedOptionValues).The singular
setSelectedOptioninselect.md(single Select widget) is correct and left unchanged.Pull request type
Checklist