I want autocomplete(for me it's a search bar) component to stay in one line and expand when searching. Sadly, the component adds another line when there is a long chip.
For example:
the image shows that the component added a line
how can I stop the component from adding a new line while maintaining it's behavior while writing in it (when you write in the component it expands to show the entire search)
I tried changing its CSS a max lines prop but it didn't work.
granted I might missed something in the CSS
To summarize the behavior of the bar:
it is a multi select
There are two situations
the user isn't using it.
In that situation the bar should just be one line nothing more
the user clicked on it and editing in the bar
In that situation the bar should expand vertically to and show all the chips
right now It correspond with the situation that I described, but if a chip that is too big it expands to two lines and I want it to stay just one line if it isn't situation 2.
Related
Is there a way to show the helper text space on a version 5 React Material UI Input on an input even when it’s disabled? Right now when the component is disabled, the helper text space goes away as well.
My use case is that when I’m in the view stage of my page, all of the inputs are disabled and then when I hit edit, this action adds the blank line of helper text which causes all of the inputs to jump as each one adds bottom padding. I’d like to avoid this jumping behavior if possible.
On a given form, we replace one component with another.
The original component is a series of TextFields, and the new form is some informational text and a button. We hide the first one, and show the second one (the UI designer has both Containers within the form).
I tried using scrollRectToVisible with various values but it didn't seem to make any difference with the scrolling.
continueButtonContainer.setHidden(false);
f.forceRevalidate();
Button continueButton =
(Button)StateMachine.GetInstance().findByName("ButtonContinue", f);
f.scrollComponentToVisible(continueButtonContainer);
f.scrollComponentToVisible(continueButton);
I'm expecting the continue button to be near the top of the screen.
If the screen was scrolled before displaying the continue button, the button ends up right at the bottom of the screen (it was below the bottom of the screen before I put in the scrollComponentToVisible line(s).
After the user scrolls the screen, the button goes up to where it needs to be, and stays there.
If the screen is not scrolled, the button appears where it should be.
I know I can probably add some invisible containers underneath the button and force them onto the screen, but I would rather have a slightly more robust solution.
There are a few issues with this. First you are using forceRevalidate which should be used in very rare cases.
Second it seems that you are invoking this on a Form, this is a bit misleading. While it seems that:
f.add(myCmp);
Adds a component to the form it is really a synonym to:
f.getContentPane().add(myCmp);
That's important because you need to invoke the scrollComponentToVisible on the scrollable container which will actually do the work and ideally be the direct parent of said component. I'm assuming it's the content pane in your case but it depends on layout etc.
The last part is letting the layout do its job. If you are invoking this before the form is showing this might not work. Notice that doing it after a call to show is meaningless as the form might take time with transitions. You can use a show listener or override the laidOut callback method to perform things like this.
I've made a form in the GUI builder that has 5 auto complete text fields. All are made in exactly the same way with their completion arrays set before the form is shown, also in exactly the same way. The first two fields work as expected. The second two fields only show their completion options after some of the picker components are used on the form (they are in the same container), and the last one never shows completion options (or is showing them off screen?).
This looks related to Codename One - AutoComplete popup window location which in turn refers to two open bugs both of which are scheduled for this release cycle:
https://github.com/codenameone/CodenameOne/issues/1687
https://github.com/codenameone/CodenameOne/issues/1697
Consider that there's a tabbed accordion, user can open one tab at a time, rendering each container take more than 100 milliseconds (sometimes like 1 second). How could I implement such a thing that user don't feel lag every time navigating between tabs and first time rendering won't be slow as well?
I'm thinking of these ways to do that:
Detaching element (or caching)
Implementing something like shouldComponentUpdate but for first time render
Some middle-way component that won't render if tab is hidden in first render and won't update if currently rendered tab is hidden.
Check if tab is rendered before and don't add it if it's not active and not rendered
Is there any library or Component that do such a thing? Or how can I implement one of these?
P.S: That's not only about performance, there's scroll position, user interactions that needs to be preserved when switching between tabs (like an input that is changed in one)
Another question for you Filemaker Pro experts. The database I am developing starts with a Main layout with a number of buttons (e.g. insert new item, show all items, etc.). Each button is associated to a script, which takes the user to the relevant layout. In each of these layouts I show the buttons in a row, and highlight the current layout with inverse colour.
My problem is that some of the buttons lead to the same layout, viewed in different modes, and I don't know how to conditionally highlight the right button.
For instance, Insert new item and Show all items take to the same layout, however in the first case the script views the layout as a form and inserts a new record, while in the second I view as a list and show all records. The layout is the same, though, so I'd need to enact a conditional formatting based on something. How do I do that, and what should I check against?
Thanks in advance for any help.
Regards.
Presumably you are currently using the formula: Get (LayoutName) to decide on your conditional formula, why not try additionally using formulas: Get(WindowMode) and Get(LayoutViewState)?
You could conditionally format the button if (which sends user to MyLayout in browse mode):
Get(WindowMode)=0 and Get(LayoutName)="MyLayout"
Or (which sends user to MyLayout in form view):
Get(LayoutViewState)=0 and Get(LayoutName)="MyLayout"
.
Other functions which may help could be Get(FoundCount) and Get(TotalRecordCount). You can see the entire list of Get functions here.