mirror of
https://github.com/apache/superset.git
synced 2026-05-12 03:15:55 +00:00
feat(SqlLab): Change Save Dataset Button to Split Save Query Button IV (#20852)
* Moving entire split save btn PR * Addressed review comments * Remove arbitrary div from ErrorBoundary in Chart * Added accidentally removed comment * Fix act errors in SaveQuery tests * Fix SaveDatasetActionButton test * SaveDatasetModal test almost working * SaveDatasetModal tests all passing * Clean SaveDatasetModal test * Fix create chart button and SaveDatasetModal text in SQL Lab * Fix untitled dataset name on SaveDatasetModal in explore * Fix styling on split save button
This commit is contained in:
committed by
GitHub
parent
3a11856ecb
commit
8a04536f9d
@@ -36,8 +36,8 @@ describe('newQueryTabName', () => {
|
||||
it('should return next available number if there are unsaved editors', () => {
|
||||
const untitledQueryText = 'Untitled Query';
|
||||
const unsavedEditors = [
|
||||
{ ...emptyEditor, title: `${untitledQueryText} 1` },
|
||||
{ ...emptyEditor, title: `${untitledQueryText} 2` },
|
||||
{ ...emptyEditor, name: `${untitledQueryText} 1` },
|
||||
{ ...emptyEditor, name: `${untitledQueryText} 2` },
|
||||
];
|
||||
|
||||
const nextTitle = newQueryTabName(unsavedEditors);
|
||||
|
||||
@@ -31,10 +31,10 @@ export const newQueryTabName = (
|
||||
|
||||
if (queryEditors.length > 0) {
|
||||
const mappedUntitled = queryEditors.filter(qe =>
|
||||
qe.title.match(untitledQueryRegex),
|
||||
qe.name.match(untitledQueryRegex),
|
||||
);
|
||||
const untitledQueryNumbers = mappedUntitled.map(
|
||||
qe => +qe.title.replace(untitledQuery, ''),
|
||||
qe => +qe.name.replace(untitledQuery, ''),
|
||||
);
|
||||
if (untitledQueryNumbers.length > 0) {
|
||||
// When there are query tabs open, and at least one is called "Untitled Query #"
|
||||
|
||||
Reference in New Issue
Block a user