mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Remove not needed semicolons + small cleanups
This commit is contained in:
@@ -395,7 +395,7 @@ export class AutoCompleteExampleSimple extends React.Component<{}, {dataSource:
|
||||
value + value + value,
|
||||
],
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
dataSourceConfig = {
|
||||
text: 'textKey',
|
||||
@@ -981,20 +981,20 @@ class CardExampleControlled extends React.Component<{}, {expanded: boolean}> {
|
||||
}
|
||||
|
||||
handleExpandChange = (expanded) => {
|
||||
this.setState({expanded: expanded});
|
||||
};
|
||||
this.setState({expanded});
|
||||
}
|
||||
|
||||
handleToggle = (event, toggle) => {
|
||||
this.setState({expanded: toggle});
|
||||
};
|
||||
}
|
||||
|
||||
handleExpand = () => {
|
||||
this.setState({expanded: true});
|
||||
};
|
||||
}
|
||||
|
||||
handleReduce = () => {
|
||||
this.setState({expanded: false});
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
@@ -1106,8 +1106,8 @@ class DatePickerExampleToggle extends React.Component<{}, DatePickerExampleToggl
|
||||
maxDate.setHours(0, 0, 0, 0);
|
||||
|
||||
this.state = {
|
||||
minDate: minDate,
|
||||
maxDate: maxDate,
|
||||
minDate,
|
||||
maxDate,
|
||||
autoOk: false,
|
||||
disableYearSelection: false,
|
||||
};
|
||||
@@ -1117,19 +1117,19 @@ class DatePickerExampleToggle extends React.Component<{}, DatePickerExampleToggl
|
||||
this.setState({
|
||||
minDate: date,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
handleChangeMaxDate = (event, date) => {
|
||||
this.setState({
|
||||
maxDate: date,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
handleToggle = (event, toggled) => {
|
||||
this.setState({
|
||||
[event.target.name]: toggled,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
@@ -1190,7 +1190,7 @@ class DatePickerExampleControlled extends React.Component<{}, {controlledDate?:
|
||||
this.setState({
|
||||
controlledDate: date,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
@@ -1252,11 +1252,11 @@ class DialogExampleSimple extends React.Component<{}, {open?: boolean}> {
|
||||
|
||||
handleOpen = () => {
|
||||
this.setState({open: true});
|
||||
};
|
||||
}
|
||||
|
||||
handleClose = () => {
|
||||
this.setState({open: false});
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
const actions = [
|
||||
@@ -1297,11 +1297,11 @@ class DialogExampleModal extends React.Component<{}, {open?: boolean}> {
|
||||
|
||||
handleOpen = () => {
|
||||
this.setState({open: true});
|
||||
};
|
||||
}
|
||||
|
||||
handleClose = () => {
|
||||
this.setState({open: false});
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
const actions = [
|
||||
@@ -1341,11 +1341,11 @@ class DialogExampleCustomWidth extends React.Component<{}, {open?: boolean}> {
|
||||
|
||||
handleOpen = () => {
|
||||
this.setState({open: true});
|
||||
};
|
||||
}
|
||||
|
||||
handleClose = () => {
|
||||
this.setState({open: false});
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
const actions = [
|
||||
@@ -1385,11 +1385,11 @@ class DialogExampleDialogDatePicker extends React.Component<{}, {open?: boolean}
|
||||
|
||||
handleOpen = () => {
|
||||
this.setState({open: true});
|
||||
};
|
||||
}
|
||||
|
||||
handleClose = () => {
|
||||
this.setState({open: false});
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
const actions = [
|
||||
@@ -1426,11 +1426,11 @@ class DialogExampleScrollable extends React.Component<{}, {open?: boolean}> {
|
||||
|
||||
handleOpen = () => {
|
||||
this.setState({open: true});
|
||||
};
|
||||
}
|
||||
|
||||
handleClose = () => {
|
||||
this.setState({open: false});
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
const actions = [
|
||||
@@ -1486,11 +1486,11 @@ class DialogExampleAlert extends React.Component<{}, {open?: boolean}> {
|
||||
|
||||
handleOpen = () => {
|
||||
this.setState({open: true});
|
||||
};
|
||||
}
|
||||
|
||||
handleClose = () => {
|
||||
this.setState({open: false});
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
const actions = [
|
||||
@@ -2258,7 +2258,7 @@ function wrapState(ComposedComponent: React.ComponentClass<__MaterialUI.List.Sel
|
||||
this.setState({
|
||||
selectedIndex: index,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
@@ -2537,13 +2537,13 @@ class IconMenuExampleControlled extends React.Component<{}, IconMenuExampleContr
|
||||
this.setState({
|
||||
valueSingle: value,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
handleChangeMultiple = (event, value) => {
|
||||
this.setState({
|
||||
valueMultiple: value,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
handleOpenMenu = () => {
|
||||
this.setState({
|
||||
@@ -2856,13 +2856,13 @@ class PopoverExampleSimple extends React.Component<{}, {open?: boolean, anchorEl
|
||||
open: true,
|
||||
anchorEl: event.currentTarget,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
handleRequestClose = () => {
|
||||
this.setState({
|
||||
open: false,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
@@ -2907,13 +2907,13 @@ class PopoverExampleAnimation extends React.Component<{}, {open?: boolean, ancho
|
||||
open: true,
|
||||
anchorEl: event.currentTarget,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
handleRequestClose = () => {
|
||||
this.setState({
|
||||
open: false,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
@@ -2974,31 +2974,31 @@ class PopoverExampleConfigurable extends React.Component<{}, PopoverExampleConfi
|
||||
open: true,
|
||||
anchorEl: event.currentTarget,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
handleRequestClose = () => {
|
||||
this.setState({
|
||||
open: false,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
setAnchor = (positionElement, position) => {
|
||||
const {anchorOrigin} = this.state;
|
||||
anchorOrigin[positionElement] = position;
|
||||
|
||||
this.setState({
|
||||
anchorOrigin: anchorOrigin,
|
||||
anchorOrigin
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
setTarget = (positionElement, position) => {
|
||||
const {targetOrigin} = this.state;
|
||||
targetOrigin[positionElement] = position;
|
||||
|
||||
this.setState({
|
||||
targetOrigin: targetOrigin,
|
||||
targetOrigin
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
@@ -3453,7 +3453,7 @@ class SliderExampleControlled extends React.Component<{}, {firstSlider?: number,
|
||||
state = {
|
||||
firstSlider: 0.5,
|
||||
secondSlider: 50,
|
||||
}
|
||||
};
|
||||
|
||||
handleFirstSlider(event, value) {
|
||||
this.setState({firstSlider: value});
|
||||
@@ -3622,13 +3622,13 @@ class SnackbarExampleSimple extends React.Component<{}, {open?: boolean}> {
|
||||
this.setState({
|
||||
open: true,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
handleRequestClose = () => {
|
||||
this.setState({
|
||||
open: false,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
@@ -3664,27 +3664,27 @@ class SnackbarExampleAction extends React.Component<{}, {open?: boolean, autoHid
|
||||
this.setState({
|
||||
open: true,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
handleActionTouchTap = () => {
|
||||
this.setState({
|
||||
open: false,
|
||||
});
|
||||
alert('Event removed from your calendar.');
|
||||
};
|
||||
}
|
||||
|
||||
handleChangeDuration = (event) => {
|
||||
const value = event.target.value;
|
||||
this.setState({
|
||||
autoHideDuration: value.length > 0 ? parseInt(value) : 0,
|
||||
autoHideDuration: value.length > 0 ? parseInt(value, 10) : 0,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
handleRequestClose = () => {
|
||||
this.setState({
|
||||
open: false,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
@@ -3739,13 +3739,13 @@ class SnackbarExampleTwice extends React.Component<{}, {open?: boolean, message?
|
||||
message: `Event ${Math.round(Math.random() * 100)} added to your calendar`,
|
||||
});
|
||||
}, 1500);
|
||||
};
|
||||
}
|
||||
|
||||
handleRequestClose = () => {
|
||||
this.setState({
|
||||
open: false,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
@@ -3781,14 +3781,14 @@ class HorizontalLinearStepper extends React.Component<{}, {stepIndex?: number, f
|
||||
stepIndex: stepIndex + 1,
|
||||
finished: stepIndex >= 2,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
handlePrev = () => {
|
||||
const {stepIndex} = this.state;
|
||||
if (stepIndex > 0) {
|
||||
this.setState({stepIndex: stepIndex - 1});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
getStepContent(stepIndex) {
|
||||
switch (stepIndex) {
|
||||
@@ -3870,14 +3870,14 @@ class VerticalLinearStepper extends React.Component<{}, {stepIndex?: number, fin
|
||||
stepIndex: stepIndex + 1,
|
||||
finished: stepIndex >= 2,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
handlePrev = () => {
|
||||
const {stepIndex} = this.state;
|
||||
if (stepIndex > 0) {
|
||||
this.setState({stepIndex: stepIndex - 1});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
renderStepActions(step) {
|
||||
const {stepIndex} = this.state;
|
||||
@@ -3971,14 +3971,14 @@ class HorizontalNonLinearStepper extends React.Component<{}, {stepIndex?: number
|
||||
if (stepIndex < 2) {
|
||||
this.setState({stepIndex: stepIndex + 1});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
handlePrev = () => {
|
||||
const {stepIndex} = this.state;
|
||||
if (stepIndex > 0) {
|
||||
this.setState({stepIndex: stepIndex - 1});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
getStepContent(stepIndex) {
|
||||
switch (stepIndex) {
|
||||
@@ -4049,14 +4049,14 @@ class VerticalNonLinear extends React.Component<{}, {stepIndex?: number}> {
|
||||
if (stepIndex < 2) {
|
||||
this.setState({stepIndex: stepIndex + 1});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
handlePrev = () => {
|
||||
const {stepIndex} = this.state;
|
||||
if (stepIndex > 0) {
|
||||
this.setState({stepIndex: stepIndex - 1});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
renderStepActions(step) {
|
||||
return (
|
||||
@@ -4176,14 +4176,14 @@ class GranularControlStepper extends React.Component<{}, {stepIndex?: number, vi
|
||||
if (stepIndex < 2) {
|
||||
this.setState({stepIndex: stepIndex + 1});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
handlePrev = () => {
|
||||
const {stepIndex} = this.state;
|
||||
if (stepIndex > 0) {
|
||||
this.setState({stepIndex: stepIndex - 1});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
getStepContent(stepIndex) {
|
||||
switch (stepIndex) {
|
||||
@@ -4266,14 +4266,14 @@ class CustomIcon extends React.Component<{}, {stepIndex?: number}> {
|
||||
if (stepIndex < 2) {
|
||||
this.setState({stepIndex: stepIndex + 1});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
handlePrev = () => {
|
||||
const {stepIndex} = this.state;
|
||||
if (stepIndex > 0) {
|
||||
this.setState({stepIndex: stepIndex - 1});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
getStepContent(stepIndex) {
|
||||
switch (stepIndex) {
|
||||
@@ -4389,16 +4389,16 @@ const tableData: {name: string, status: string, selected?: boolean}[] = [
|
||||
];
|
||||
|
||||
interface TableExampleComplexState {
|
||||
fixedHeader?: boolean,
|
||||
fixedFooter?: boolean,
|
||||
stripedRows?: boolean,
|
||||
showRowHover?: boolean,
|
||||
selectable?: boolean,
|
||||
multiSelectable?: boolean,
|
||||
enableSelectAll?: boolean,
|
||||
deselectOnClickaway?: boolean,
|
||||
showCheckboxes?: boolean,
|
||||
height?: string,
|
||||
fixedHeader?: boolean;
|
||||
fixedFooter?: boolean;
|
||||
stripedRows?: boolean;
|
||||
showRowHover?: boolean;
|
||||
selectable?: boolean;
|
||||
multiSelectable?: boolean;
|
||||
enableSelectAll?: boolean;
|
||||
deselectOnClickaway?: boolean;
|
||||
showCheckboxes?: boolean;
|
||||
height?: string;
|
||||
}
|
||||
|
||||
class TableExampleComplex extends React.Component<{}, TableExampleComplexState> {
|
||||
@@ -4424,11 +4424,11 @@ class TableExampleComplex extends React.Component<{}, TableExampleComplexState>
|
||||
this.setState({
|
||||
[event.target.name]: toggled,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
handleChange = (event) => {
|
||||
this.setState({height: event.target.value});
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
@@ -4608,9 +4608,9 @@ class TabsExampleControlled extends React.Component<{}, {value?: string}> {
|
||||
|
||||
handleChange = (value) => {
|
||||
this.setState({
|
||||
value: value,
|
||||
value
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
@@ -4807,7 +4807,7 @@ class TextFieldExampleControlled extends React.Component<{}, {value?: string}> {
|
||||
this.setState({
|
||||
value: event.target.value,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
@@ -4849,11 +4849,11 @@ class TimePickerExampleComplex extends React.Component<{}, {value24?: Date, valu
|
||||
|
||||
handleChangeTimePicker24 = (event, date) => {
|
||||
this.setState({value24: date});
|
||||
};
|
||||
}
|
||||
|
||||
handleChangeTimePicker12 = (event, date) => {
|
||||
this.setState({value12: date});
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
@@ -4948,7 +4948,7 @@ class BottomNavigationExample extends React.Component<{}, {
|
||||
return <BottomNavigation selectedIndex={this.state.index}>
|
||||
<BottomNavigationItem label='0' icon={<ActionHome/>} onTouchTap={() => this.setState({index: 0})}/>
|
||||
<BottomNavigationItem label='1' icon={<ActionInfo/>} onTouchTap={() => this.setState({index: 1})}/>
|
||||
</BottomNavigation>
|
||||
</BottomNavigation>;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user