ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

refactor(ui5-input): replace openPicker method with public property open

Open nikoletavnv opened this issue 9 months ago • 2 comments

Method openPicker of ui5-input is replaced with public property open

BREAKING CHANGE: Removed openPicker method and replaced it with public property open

Before, the ui5-input suggestions picker could be opened by calling openPicker() :

const input = document.getElementById("exampleID");
input.openPicker();

Now the suggestions picker is opened by setting the open property to true:

const input = document.getElementById("exampleID");
input.open = true;

You can now close the suggestions picker setting the open property to false:

const input = document.getElementById("exampleID");
input.open = false;

When the suggestion picker opens or closes internally, open and close events are fired. You can listen for those events like this:

const input = document.getElementById("exampleID");
input.addEventListener("open", (event) => {});
input.addEventListener("close", (event) => {});

Related to: #8461

nikoletavnv avatar May 13 '24 15:05 nikoletavnv