Jump to content

TUnimSelect If First Item = '' Then It Fails To Show In Desktop Emulation ?


andyhill

Recommended Posts

I know this is the Desktop Forum but I am tired of the Mobile Forum postings being overlooked -or- not addressed regularly enough.

As stated, My Mobile Application uses TUnimSelect and If the First Item = '' (blank string) then it Fails To Show In Desktop Emulation ?

It works as intended on Mobile Platforms.

Yes I know I can have a clearable button but it is too close to the select button and fat fingers fires it when it should not.

Please advise. 

Link to comment
Share on other sites

Hello,

13 hours ago, andyhill said:

As stated, My Mobile Application uses TUnimSelect and If the First Item = '' (blank string) then it Fails To Show In Desktop Emulation ?

Please, can you explain in more details, I couldn't reproduce ?!

You can also post on ActiveReports if you think that this a bug.

But please always specify the build, the browser you are using, make a testcase or steps to reproduce. I know that a testcase may not replace your working project, but it will help us understand the problem better.

Thank you

 

 

Link to comment
Share on other sites

unim-1.50.0.1481

UnimSelect.Items.Add('');  // or ' '
UnimSelect.Items.Add('1'); 
UnimSelect.Items.Add('2'); 
UnimSelect.Items.Add('3'); 

if UnimSelect.ItemIndex was 2 ('2') and user select 0 ('') the ItemIndex is not updated to 0 due to the blank string

Link to comment
Share on other sites

I have come up with the following work around that uses the CloseUp Event with a deferred reading of the new select value via an ajax event:-

// OnCloseUp Event Bug Work Around
procedure TMymForm.MySelectOnCloseUp(Sender: TObject);
begin
  //
  if ByPassMySelectFlag = True then begin
    ByPassMySelectFlag:= False;
    Exit;
  end;
  //
  UniSession.AddJS('Ext.defer(function(){ajaxRequest(MymForm.ContainerPanel, "_mySelect_", []);}, 500)');
  //
end;

...

if SameText(EventName, '_mySelect_') then begin

...

Link to comment
Share on other sites

Your suggestion would show <empty> in the select options (not acceptable), I use a blank line to select a blank line.

I have an ajax work around but unigui should be able to show a blank line in the select options -or- offer extra clear button:-

[Select]    [Clear]   [Cancel]

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...