File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
template/app/src/admin/dashboards/users Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -91,8 +91,9 @@ const UsersTable = () => {
9191 </ div >
9292 < select
9393 onChange = { ( e ) => {
94- const selectedValue = e . target . value == '' ? null : e . target . value ;
94+ const selectedValue = e . target . value == 'has_not_subscribed ' ? null : e . target . value ;
9595
96+ console . log ( selectedValue ) ;
9697 if ( selectedValue === 'clear-all' ) {
9798 setSubcriptionStatusFilter ( [ ] ) ;
9899 } else {
@@ -109,15 +110,15 @@ const UsersTable = () => {
109110 id = 'status-filter'
110111 className = 'absolute top-0 left-0 z-20 h-full w-full bg-white opacity-0'
111112 >
112- < option value = 'clear-all' > Clear all </ option >
113- < option key = 'has-not-subscribed' value = '' >
114- has not subscribed
115- </ option >
116- { [ ... Object . values ( SubscriptionStatus ) ] . map ( ( status ) => (
117- < option key = { status } value = { status } >
118- { status }
119- </ option >
120- ) ) }
113+ < option value = 'select-filters' > Select filters </ option >
114+ { [ ... Object . values ( SubscriptionStatus ) , null ]
115+ . filter ( ( status ) => ! subscriptionStatusFilter . includes ( status ) )
116+ . map ( ( status ) => {
117+ const extendedStatus = status ?? 'has_not_subscribed'
118+ return < option key = { extendedStatus } value = { extendedStatus } >
119+ { extendedStatus }
120+ </ option >
121+ } ) }
121122 </ select >
122123 < span className = 'absolute top-1/2 right-4 z-10 -translate-y-1/2' >
123124 < ChevronDownIcon />
@@ -220,7 +221,7 @@ const UsersTable = () => {
220221 </ div >
221222 </ div >
222223 ) ;
223- }
224+ } ;
224225
225226function ChevronDownIcon ( ) {
226227 return (
You can’t perform that action at this time.
0 commit comments