bad style of selectbox in datatable with filter

Locked
chaloupka
Posts: 15
Joined: 03 Dec 2012, 21:48

28 Nov 2015, 19:26

Hello,
when I use datatable with filter (filterOptions="#{listTasks.projectsForMeOwner}" ), selectbox is not styled in theme. Selectbox is displayed as <h:selectOneMenu, not <p:...

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

30 Nov 2015, 10:11

This is an expected behavior. We render a HTML select tag with filterOptions in datatable. For this issue, I think you can use f:facet name="filter" instead of filterOptions.
Exp;

Code: Select all

<p:column filterBy="#{car.year}" headerText="Year" filterMatchMode="exact">
    <f:facet name="filter">
        <p:selectOneMenu onchange="PF('carsTable').filter()" >
            <f:selectItem itemLabel="Select One" itemValue="#{null}" noSelectionOption="true" />
            <f:selectItems value="#{dtSelectionView.filterOptions}" />
        </p:selectOneMenu>
    </f:facet>
    <h:outputText value="#{car.year}" />
</p:column>

chaloupka
Posts: 15
Joined: 03 Dec 2012, 21:48

26 Dec 2015, 14:19

Thank you.
Is possible to have filter and column name in one row?

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

28 Dec 2015, 10:13

I think you need to write a custom JS and override the css.

Locked

Return to “Adamantium”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests