caduandrade / tabbed_view

Widget inspired by the classic Desktop-style tab component.
MIT License
49 stars 16 forks source link

Ability to close tab which is not in focus / selected #30

Closed 5hirish closed 1 year ago

5hirish commented 1 year ago

Currently to close a tab, the tab has to be selected and then it can be closed. How can we integrate functionality to close other tabs that are not in focus or selected.

Happy to contribute this if any direction is available.

caduandrade commented 1 year ago

Hi @5hirish !

By default, the tab must be selected to allow clicking on its buttons, but there is a property that enables clicking on buttons on all tabs:

TabbedView(controller: _controller, selectToEnableButtons: false);

Some points of attention:

  1. This property will enable all buttons, not just the close ok? Maybe it could be even more configurable...
  2. There is a risk of the user clicking on a tab wanting to select it and accidentally clicking on close.
5hirish commented 1 year ago

Thanks a bunch @caduandrade ! Is there any way to introduce tab reordering functionality?

21

caduandrade commented 1 year ago

Sure, it's on the roadmap