Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
f2e245fe
Commit
f2e245fe
authored
Oct 13, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #972 from cebe/grid-filter-only-active
Filter only active attributes in gridview
parents
4050a4b2
5ad8fe5f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
DataColumn.php
framework/yii/grid/DataColumn.php
+3
-1
No files found.
framework/yii/grid/DataColumn.php
View file @
f2e245fe
...
@@ -115,7 +115,9 @@ class DataColumn extends Column
...
@@ -115,7 +115,9 @@ class DataColumn extends Column
{
{
if
(
is_string
(
$this
->
filter
))
{
if
(
is_string
(
$this
->
filter
))
{
return
$this
->
filter
;
return
$this
->
filter
;
}
elseif
(
$this
->
filter
!==
false
&&
$this
->
grid
->
filterModel
instanceof
Model
&&
$this
->
attribute
!==
null
)
{
}
elseif
(
$this
->
filter
!==
false
&&
$this
->
grid
->
filterModel
instanceof
Model
&&
$this
->
attribute
!==
null
&&
$this
->
grid
->
filterModel
->
isAttributeActive
(
$this
->
attribute
))
{
if
(
is_array
(
$this
->
filter
))
{
if
(
is_array
(
$this
->
filter
))
{
$options
=
array_merge
(
array
(
'prompt'
=>
''
),
$this
->
filterInputOptions
);
$options
=
array_merge
(
array
(
'prompt'
=>
''
),
$this
->
filterInputOptions
);
return
Html
::
activeDropDownList
(
$this
->
grid
->
filterModel
,
$this
->
attribute
,
$this
->
filter
,
$options
);
return
Html
::
activeDropDownList
(
$this
->
grid
->
filterModel
,
$this
->
attribute
,
$this
->
filter
,
$options
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment