Fix wrong tag index in TagsInput when updated via python #3862
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.
This change fixes a bug in the
TagsInput
when thevalue
attribute is updated frompython
with a list of different length than the widget currently has and theinputIndex
in the frontend not being updated.This leads to wrong insertions of new values
![TagsInput-bug](https://private-user-images.githubusercontent.com/9513634/283953834-5a824f5b-a7c9-4dd8-afbc-11c31b888d9f.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NzU0NjYsIm5iZiI6MTczODk3NTE2NiwicGF0aCI6Ii85NTEzNjM0LzI4Mzk1MzgzNC01YTgyNGY1Yi1hN2M5LTRkZDgtYWZiYy0xMWMzMWI4ODhkOWYuZ2lmP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDhUMDAzOTI2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YjVlNGZjYzBhYWFhZDcwYjRkZmU4ZThlZTI2M2MxYmIyMTZkYTg3MTg2YmM0OWEzYmExMGY4NGFjYWRiNDc5YiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.O3PwCTHfc2vdapuvYH9ThNYYDP5KHlDI2rY9oM2DTgE)