Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

programmatic unselection does not update map #258

Closed
spaasis opened this issue Nov 26, 2019 · 2 comments · Fixed by CodeForBaltimore/codeforbaltimore.org#20
Closed

programmatic unselection does not update map #258

spaasis opened this issue Nov 26, 2019 · 2 comments · Fixed by CodeForBaltimore/codeforbaltimore.org#20
Assignees
Labels

Comments

@spaasis
Copy link

spaasis commented Nov 26, 2019

Hi,

When I have a

      <vl-interaction-select
        ref="selectInteraction"
        :features.sync="selectedFeatures"
      ></vl-interaction-select>

and remove a feature from selectedFeatures programmatically:

  public removeSelection(id: number) {
    const mapFeatureIndex = this.selectedFeatures.findIndex((f) => f.id === id);
    this.selectedFeatures.splice(mapFeatureIndex, 1);
  }

The map still has the selected style for the unselected feature.
If I add $refs.selectInteraction.clearFeatures(); into removeSelection, the map reflects the unselection as expected.

@spaasis spaasis changed the title programmatic unselection does not refresh selection programmatic unselection does not update map Nov 26, 2019
@ghettovoice ghettovoice self-assigned this Dec 4, 2019
@ghettovoice ghettovoice added the bug label Dec 4, 2019
@ghettovoice
Copy link
Owner

Hello @spaasis ,
good catch! Thanks for report!

@ghettovoice
Copy link
Owner

See v0.11.18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants