Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
fa251e76
Commit
fa251e76
authored
7 years ago
by
Kyle Doherty
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
clean up EditReferenceHeader and Detail inputs (#5719)
parent
5a02c313
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/src/metabase/reference/components/Detail.jsx
+1
-1
1 addition, 1 deletion
frontend/src/metabase/reference/components/Detail.jsx
frontend/src/metabase/reference/components/EditableReferenceHeader.jsx
+11
-12
11 additions, 12 deletions
...metabase/reference/components/EditableReferenceHeader.jsx
with
12 additions
and
13 deletions
frontend/src/metabase/reference/components/Detail.jsx
+
1
−
1
View file @
fa251e76
...
...
@@ -21,7 +21,7 @@ const Detail = ({ name, description, placeholder, subtitleClass, url, icon, isEd
<
textarea
className
=
{
S
.
detailTextarea
}
placeholder
=
{
placeholder
}
{
...
field
}
onChange
=
{
field
.
onChange
}
//FIXME: use initialValues from redux forms instead of default value
// to allow for reinitializing on cancel (see GettingStartedGuide.jsx)
defaultValue
=
{
description
}
...
...
This diff is collapsed.
Click to expand it.
frontend/src/metabase/reference/components/EditableReferenceHeader.jsx
+
11
−
12
View file @
fa251e76
...
...
@@ -10,6 +10,7 @@ import E from "metabase/reference/components/EditButton.css";
import
IconBorder
from
"
metabase/components/IconBorder.jsx
"
;
import
Icon
from
"
metabase/components/Icon.jsx
"
;
import
Input
from
"
metabase/components/Input.jsx
"
;
import
Ellipsified
from
"
metabase/components/Ellipsified.jsx
"
;
import
EditButton
from
"
metabase/reference/components/EditButton.jsx
"
;
...
...
@@ -54,21 +55,19 @@ const EditableReferenceHeader = ({
style
=
{
isEditing
&&
name
===
'
Details
'
?
{
alignItems
:
"
flex-start
"
}
:
{}
}
>
{
isEditing
&&
name
===
'
Details
'
?
hasDisplayName
?
<
input
<
Input
className
=
{
S
.
headerTextInput
}
type
=
"text"
placeholder
=
{
entity
.
name
}
{
...
displayNameFormField
}
defaultValue
=
{
entity
.
display_name
}
/>
:
<
input
className
=
{
S
.
headerTextInput
}
type
=
"text"
placeholder
=
{
entity
.
name
}
{
...
nameFormField
}
defaultValue
=
{
entity
.
name
}
/>
:
onChange
=
{
hasDisplayName
?
displayNameFormField
.
onChange
:
nameFormField
.
onChange
}
defaultValue
=
{
hasDisplayName
?
entity
.
display_name
:
entity
.
name
}
/>
:
[
<
Ellipsified
key
=
"1"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment