Page 1 of 1

Problems with search box (ver4.2.23)

Posted: Tue Sep 25, 2018 10:20 am
by winnet
Hi, the metro ui is cool and we have replaced bootstrap with Metro 4 on all projects.
However, the version 4.2.23 has changed the code of "search box" and the "data-on-search-button-click" event can not be triggered correctly!
I have read the guide on "Components - Forms - Search" very carefully and can not figure out how to make it work.
I have tried the following code, but none of these is working.

<input type="text" data-role="input" data-search-button="true" data-search-button-click="button" data-on-search-button-click="alert('clicked!')" />
<input type="text" data-role="input" data-search-button="true" data-search-button-click="submit" data-on-search-button-click="alert('clicked!')" />
<input type="text" data-role="input" data-search-button="true" data-on-search-button-click="alert('clicked!')" />



Please tell me if there is something wrong as we have already upgraded all the on-going projects!

Thanks in advance! The Metro 4 is perfect!

Re: Problems with search box (ver4.2.23)

Posted: Tue Sep 25, 2018 10:47 am
by olton

Re: Problems with search box (ver4.2.23)

Posted: Tue Sep 25, 2018 11:41 am
by winnet
Thank you for your reply!
I have tested the following new code, but only "submit func" works.
The custom function doesn't work for now.
Please note that I have added "data-search-button=true" in the example.

<script>
function mySubmitSearch(val){
alert('Custom submit function');
}
</script>
<form action="javascript:" onsubmit="alert('Form submit with self function');">
<p>Custom func</p>
<input type="text" data-role="input"
data-search-button-click="custom"
data-search-button="true"
data-on-search-button-click="mySubmitSearch">

<p>Form submit func</p>
<input type="text" data-search-button="true" data-role="input">
</form>

Re: Problems with search box (ver4.2.23)

Posted: Tue Sep 25, 2018 11:51 am
by olton
Thank you! I fix it in 4.2.24

Re: Problems with search box (ver4.2.23)

Posted: Tue Sep 25, 2018 11:58 am
by winnet
olton wrote:
Tue Sep 25, 2018 11:51 am
Thank you! I fix it in 4.2.24
Metro UI is great! Waiting for your new release!

Re: Problems with search box (ver4.2.23)

Posted: Tue Sep 25, 2018 12:11 pm
by olton
You can get develop branch :) from https://github.com/olton/Metro-UI-CSS/tree/4.2.24 and not wait for release.