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

[Feature Request] TabContainer: make tab-select preventable

Open ilhan007 opened this issue 2 years ago • 1 comments

Feature Request Description

As I developer, I would like to be able to prevent the selection-change event. Origin: https://github.com/SAP/ui5-webcomponents/issues/4883

Proposed Solution

There are several examples in other components that we already implemented this behaviour. It's based on. the fireEvent return value, which indicates if the event has been prevented in the event handler.

Example:

/**
		 *
		 * Fired, when the notification icon is activated.
		 *
		 *
		 * @event sap.ui.webcomponents.fiori.ShellBar#notifications-click
		 * @allowPreventDefault
		 * @param {HTMLElement} targetRef dom ref of the activated element
		 * @public
		 */
		"notifications-click": {
			detail: {
				targetRef: { type: HTMLElement },
			},
		},
		
		
		const prevented = !this.fireEvent("notifications-click", {}, true);

Priority

  • [ ] Low
  • [x] Medium
  • [ ] High
  • [ ] Very High

A clear and concise description of the impact/urgency of the required feature.

Stakeholder Info (if applicable)

  • Organization: {...} SAP, UI5 Web Components 4 React
  • Business impact: {...}

ilhan007 avatar Aug 05 '22 11:08 ilhan007

Hello @SAP/ui5-webcomponents-topic-rd step by step we do allow preventing of the events with standard means - event.preventDefault to make web components behave as regular HTML elements. This request is regarding the TabContainer's tab-select event.

ilhan007 avatar Aug 05 '22 12:08 ilhan007

Solved with #5661

georgimkv avatar Sep 13 '22 07:09 georgimkv