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

[Tabs] Controllability in Tabs #1229

Closed
wants to merge 8 commits into from
Closed

Conversation

Zadielerick
Copy link
Contributor

Tabs are now controllable with this PR. Passing a value prop will allow you to programmatically choose which Tab is active or if no Tab is selected at all. If no value prop is passed, Tabs work normally as they have worked before this PR.

Breaking Changes: onChange(tabIndex, tab) now receives onChange(e, tab)

Fix: You can access the tabIndex of the tab by simply writing tabIndex = tab.props.tabIndex;

@hai-cea hai-cea closed this Jul 21, 2015
@Zadielerick Zadielerick deleted the TabsProp branch July 23, 2015 21:01
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Nov 10, 2020
* Documentation improvements  (mui#1229)

* [docs] Show DateIOType instead of anys  (mui#1228)

* Show DateIOType instead of any in prop types tables

* Update patrons list

* Remove unused filter

* Ovveride keyboard datepicker onChange date type

* Update prop-types.json

* Clarify TypeScript instructions for CSS overrides (mui#1257)

* Fix MuiPickersOverrides import in CSS guide

* Make instructions a little more dummy proof

* Tidyup build config (mui#1309)

* Tidyup build config

- upgraded babel
- upgraded rollup
- fixed material-ui globals
- replaced babel cli with rollup config with many entries
- auto resolve named exports
- skip non existent export warning
- import correct (esm/cjs) babel helpers
- error when material-ui global is not provided

Here's generated build/esm/. Treeshaking should work fine.

```
Calendar-b9ae6101.js
Calendar.js
Clock-3486e4fb.js
Clock.js
ClockView.js
DatePicker.js
DateTimePicker.js
Day.js
Picker-429246aa.js
Picker.js
TimePicker.js
TimePickerToolbar-e568e280.js
Wrapper-12538b96.js
index.js
makePickerWithState-8a1dec7e.js
useUtils-7fbeb79a.js
```

* Remove object-rest-spread
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Nov 10, 2020
* Update packages

* [typescript] Fix extending TextField issue

* Master (mui#1314)

* Documentation improvements  (mui#1229)

* [docs] Show DateIOType instead of anys  (mui#1228)

* Show DateIOType instead of any in prop types tables

* Update patrons list

* Remove unused filter

* Ovveride keyboard datepicker onChange date type

* Update prop-types.json

* Clarify TypeScript instructions for CSS overrides (mui#1257)

* Fix MuiPickersOverrides import in CSS guide

* Make instructions a little more dummy proof

* Tidyup build config (mui#1309)

* Tidyup build config

- upgraded babel
- upgraded rollup
- fixed material-ui globals
- replaced babel cli with rollup config with many entries
- auto resolve named exports
- skip non existent export warning
- import correct (esm/cjs) babel helpers
- error when material-ui global is not provided

Here's generated build/esm/. Treeshaking should work fine.

```
Calendar-b9ae6101.js
Calendar.js
Clock-3486e4fb.js
Clock.js
ClockView.js
DatePicker.js
DateTimePicker.js
Day.js
Picker-429246aa.js
Picker.js
TimePicker.js
TimePickerToolbar-e568e280.js
Wrapper-12538b96.js
index.js
makePickerWithState-8a1dec7e.js
useUtils-7fbeb79a.js
```

* Remove object-rest-spread

* Update packages

* Fix typescript compilation errros
@zannager zannager added the component: tabs This is the name of the generic UI component, not the React module! label Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tabs This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants