mirror of
https://github.com/apache/superset.git
synced 2026-04-21 09:04:38 +00:00
refactor(sql_lab): SQL Lab Persistent Saved State (#17771)
* a lot of console logs * testing * test * added saved_query to remoteId * created useEffect so that title properly changes in modal * Update superset-frontend/src/SqlLab/actions/sqlLab.js Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com> Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com>
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import React, { useState } from 'react';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Row, Col, Input, TextArea } from 'src/common/components';
|
||||
import { t, styled } from '@superset-ui/core';
|
||||
import Button from 'src/components/Button';
|
||||
@@ -90,6 +90,11 @@ export default function SaveQuery({
|
||||
description,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (!isSaved) {
|
||||
setLabel(defaultLabel);
|
||||
}
|
||||
}, [defaultLabel]);
|
||||
const close = () => {
|
||||
setShowSave(false);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user