You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read the template completely before filling it in.
Context
Different results in the outcome on method calls of the setValues method in various scenarios
Current Behavior
Scenario 1 - Call setValues with initial data set
When the setValues method is called with an item list containing the id's of the initial data, the component selects the given entries in the item list
Data entry names remain as initialized
Scenario 2 - Call setValues without initial data
In this scenario no data is set on initialization, we call the setValues method with a list of entries, the entries are created as defined in the setValues method, passed entries are rendered in the list and selected
Scenario 3 - Call setValues with initial data and addition of non existing items
Compare the addition of items to scenario 2, where items are being added by setValues
If we call setValues with initial data set, no new items are added but initial items set on the data property are selected, setValues data entry names remain as initialized, even when changed
Expected behavior
As of the JSDocs, the function should set selected values, this seem to work, but since full objects are given and text change does not seem to be permitted on the initially created data entries, it seems a bit redundant passing the full objects
Possible Solutions or Causes
Create new method as already existing selectOption, with ids array argument, deprecate setValues
Before submitting...
Context
Different results in the outcome on method calls of the setValues method in various scenarios
Current Behavior
Scenario 1 - Call setValues with initial data set
When the setValues method is called with an item list containing the id's of the initial data, the component selects the given entries in the item list
Data entry names remain as initialized
Scenario 2 - Call setValues without initial data
In this scenario no data is set on initialization, we call the setValues method with a list of entries, the entries are created as defined in the setValues method, passed entries are rendered in the list and selected
Scenario 3 - Call setValues with initial data and addition of non existing items
Compare the addition of items to scenario 2, where items are being added by setValues
If we call setValues with initial data set, no new items are added but initial items set on the data property are selected, setValues data entry names remain as initialized, even when changed
Expected behavior
As of the JSDocs, the function should set selected values, this seem to work, but since full objects are given and text change does not seem to be permitted on the initially created data entries, it seems a bit redundant passing the full objects
Possible Solutions or Causes
Steps to reproduce
Codepen example with above 3 scenarios demostrated
Your Environment
The text was updated successfully, but these errors were encountered: