Skip to content

Commit

Permalink
feat: handle save data set for screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Lan Le committed Apr 1, 2024
1 parent d2ffacd commit 9a3218b
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import CommentActions from 'src/stores/alt/actions/CommentActions';
import CommentModal from 'src/components/common/CommentModal';
import { commentActivation } from 'src/utilities/CommentHelper';
import { formatTimeStampsOfElement } from 'src/utilities/timezoneHelper';
import { handleSaveDataset } from 'src/utilities/ElementUtils';

export default class ScreenDetails extends Component {
constructor(props) {
Expand Down Expand Up @@ -83,14 +84,8 @@ export default class ScreenDetails extends Component {
activeTab: state.screen.activeTab
});
}
}

onUIStoreChange(state) {
if (state.screen.activeTab != this.state.activeTab) {
this.setState({
activeTab: state.screen.activeTab
});
}
const { screen } = this.state;
handleSaveDataset(screen, state, this.handleSubmit);
}

onTabPositionChanged(visible) {
Expand All @@ -99,7 +94,7 @@ export default class ScreenDetails extends Component {

handleSubmit() {
const { screen } = this.state;
LoadingActions.start();
LoadingActions.start.defer();

if (screen.isNew) {
ElementActions.createScreen(screen);
Expand Down

0 comments on commit 9a3218b

Please sign in to comment.